contract Mobu is ERC20Burnable, Claimable {
    string public constant name    = "MOBU";  
    string public constant symbol  = "MOBU";  
    uint8 public constant decimals = 18;
    
    uint256 constant initialSupply = 150000000e18;

	// Token holders
	address public mainHolderAddress;
    address public teamAddress;
    address public advisorsAddress;
    address public bountyAddress;

	// Start unlocking period for locked tokens
    uint public beginUnlockDate = 0;

	// Flags to check if locked tokens have been already transferred
	bool teamTokensClaimed = false;
	bool advisorsTokensClaimed = false;
	bool bountyTokensClaimed = false;

    modifier unlockingPeriodStarted() { 
         require (beginUnlockDate != 0);
        _; 
    }

    constructor(address _mainHolderAddress, address _teamAddress, address _advisorsAddress, address _bountyAddress) public {
    	mainHolderAddress = _mainHolderAddress;
        teamAddress = _teamAddress;
        advisorsAddress = _advisorsAddress;
        bountyAddress = _bountyAddress;

		// Main MOBU token holder address has 80% of MOBU Tokens
        _mint(_mainHolderAddress, 120000000e18);
        
        // Total 12% Tokens Lock-up schedule
        // Airdrop/bounty: 4% locked-up for 1 month
        // Team: 12% locked-up for 1 year.
        // Advisors: 4% locked-up for 3 months
        // These tokens will be held by the smart contract until the locked-up period
        _mint(address(this), 30000000e18);
    }

	// Owner can start unlocking period
    function startUnlockingPeriod() public onlyOwner {
        require (beginUnlockDate == 0);
        beginUnlockDate = now;
    }
    
    // 4% Airdrop/bounty tokens can be claimed after 1 month
    function claimBountyTokens() public unlockingPeriodStarted {
        require (now > beginUnlockDate + 30 days);
        require (!bountyTokensClaimed);
        bountyTokensClaimed = true;
        _transfer(address(this), bountyAddress, 6000000e18);
    }
    
    // 12% of Team tokens can be claimed after 12 months
    function claimTeamTokens() public unlockingPeriodStarted {
        require (now > beginUnlockDate + 365 days);
        require (!teamTokensClaimed);
        teamTokensClaimed = true;
        _transfer(address(this), teamAddress, 18000000e18);
    }
    
    // 4% of Advisors tokens can be claimed after 3 months
    function claimAdvisorTokens() public unlockingPeriodStarted {
        require (now > beginUnlockDate + 90 days);
        require (!advisorsTokensClaimed);
        advisorsTokensClaimed = true;
        _transfer(address(this), advisorsAddress, 6000000e18);
    }
    
    // Owner can recover any ERC-20 tokens sent to contract address.
    function recover(ERC20 _token) public onlyOwner {
        _token.transfer(msg.sender, _token.balanceOf(address(this)));
    }
}
function claimTeamTokens() public unlockingPeriodStarted {
    require (now > beginUnlockDate + 365 days);
    require (!teamTokensClaimed);
    teamTokensClaimed = true;
    _transfer(address(this), teamAddress, 18000000e18);
}

// 12% of Team tokens can be claimed after 12 months