contract ThemisToken is Ownable, StandardToken {

  string public constant name = "Themis Token";
  string public constant symbol = "THM";
  uint8 public constant decimals = 18;

  uint256 public angelSupply;                            // Angels sale supply
  uint256 public earlyBirdsSupply;                       // Early birds supply
  uint256 public foundationSupply;                       // Foundation/Community supply
  uint256 public teamSupply;                             // Team supply
  uint256 public marketingSupply;                        // Marketing & strategic supply
  uint256 public optionSupply;                           // Option supply

  address public angelAddress;                           // Angel address
  address public earlyBirdsAddress;                      // Early Birds address
  address public teamAddress;                            // Team address
  address public foundationAddress;                      // Foundation address
  address public marketingAddress;                       // Marketing address
  address public optionAddress;                          // Option address

  /**
   * @dev Constructor that gives msg.sender all of existing tokens.
   */
  function ThemisToken() public {
    totalSupply_        =  3000000000 * 1e18;
    angelSupply         =   300000000 * 1e18;             //  10% -  for private angels sale
    earlyBirdsSupply    =   600000000 * 1e18;             //  20% -  for early-bird sale
    teamSupply          =   450000000 * 1e18;             //  15% -  for team
    foundationSupply    =   750000000 * 1e18;             //  25% -  for foundation/incentivising efforts
    marketingSupply     =   600000000 * 1e18;             //  20% -  for covering marketing and strategic expenses
    optionSupply        =   300000000 * 1e18;             //  10% -  for option

    angelAddress         = 0xD58aE13Eb1e8CDb92088709A6868d32C993FAd74;  // Angel address
    earlyBirdsAddress    = 0xac9EaB9C4c403441fb8592529A3cE534E68246ED;  // Early Birds address
    teamAddress          = 0x4d06220df2BC77C3E47b72611AA79915611Ed23B;  // Team address
    foundationAddress    = 0xDa2AB3712A490cC6Df661E3ae398BeA24434349F;  // Foundation/Community address
    marketingAddress     = 0x9f160Ed0F3B8d5180Eb5cC97c43CF7Fe1efFE02C;  // Marketing/Strategic address
    optionAddress        = 0x47343c223F3605aC541a8eC61e5Fd41EBDdEc9d1;  // Option address

    releaseAngelTokens();
    releaseEarlyBirdsTokens();
    releaseFoundationTokens();
    releaseTeamTokens();
    releaseMarketingTokens();
    releaseOptionTokens();

    //balances[msg.sender] = totalSupply_;
    //Transfer(0x0, msg.sender, totalSupply_);
  }

  // -------------------------------------------------
  // Releases angel supply
  // -------------------------------------------------
  function releaseAngelTokens() internal returns(bool success) {
      require(angelSupply > 0);
      balances[angelAddress] = angelSupply;
      Transfer(0x0, angelAddress, angelSupply);
      angelSupply = 0;
      return true;
  }

  // -------------------------------------------------
  // Releases earlybirds supply
  // -------------------------------------------------
  function releaseEarlyBirdsTokens() internal returns(bool success) {
      require(earlyBirdsSupply > 0);
      balances[earlyBirdsAddress] = earlyBirdsSupply;
      Transfer(0x0, earlyBirdsAddress, earlyBirdsSupply);
      earlyBirdsSupply = 0;
      return true;
  }

  // -------------------------------------------------
  // Releases team supply
  // -------------------------------------------------
  function releaseTeamTokens() internal returns(bool success) {
    require(teamSupply > 0);
    balances[teamAddress] = teamSupply;
    Transfer(0x0, teamAddress, teamSupply);
    teamSupply = 0;
    return true;
  }

  // -------------------------------------------------
  // Releases foundation supply
  // -------------------------------------------------
  function releaseFoundationTokens() internal returns(bool success) {
    require(foundationSupply > 0);
    balances[foundationAddress] = foundationSupply;
    Transfer(0x0, foundationAddress, foundationSupply);
    foundationSupply = 0;
    return true;
  }

  // -------------------------------------------------
  // Releases Marketing supply
  // -------------------------------------------------
  function releaseMarketingTokens() internal returns(bool success) {
    require(marketingSupply > 0);
    balances[marketingAddress] = marketingSupply;
    Transfer(0x0, marketingAddress, marketingSupply);
    marketingSupply = 0;
    return true;
  }

  // -------------------------------------------------
  // Releases Option supply
  // -------------------------------------------------
  function releaseOptionTokens() internal returns(bool success) {
      require(optionSupply > 0);
      balances[optionAddress] = optionSupply;
      Transfer(0x0, optionAddress, optionSupply);
      optionSupply = 0;
      return true;
  }

}
function releaseOptionTokens() internal returns(bool success) {
    require(optionSupply > 0);
    balances[optionAddress] = optionSupply;
    Transfer(0x0, optionAddress, optionSupply);
    optionSupply = 0;
    return true;
}

// -------------------------------------------------
// Releases Option supply
// -------------------------------------------------