contract Fluz is Token {

    string public constant name = "FluzFluz";
    string public constant symbol = "FLUZ";
    uint8 public constant decimals = 18;
    uint256 public constant totalSupply = 204780000 * 10**18;

    uint public launched = 0; // Time of locking distribution and retiring founder; 0 means not launched
    address public founder = 0x81D5ce5Bf1F4F0a576De11Fd9631e789D72c9BdE; // Founder's address
    mapping (address => uint256) public balances;
    mapping (address => mapping (address => uint256)) public allowed;
    
    bool public transfersAreLocked = true;

    function Fluz() public {
        balances[founder] = totalSupply;
    }
    
    /**
     * Modifier to check whether transfers are unlocked or the owner is sending
     */
    modifier canTransfer() {
        require(msg.sender == founder || !transfersAreLocked);
        _;
    }
    
    /**
     * Modifier to allow only founder to transfer
     */
    modifier onlyFounder() {
        require(msg.sender == founder);
        _;
    }

    /**
     * Transfer with checking if it's allowed
     */
    function transfer(address _to, uint256 _value) public canTransfer returns (bool success) {
        if (balances[msg.sender] < _value) {
            return false;
        }
        balances[msg.sender] -= _value;
        balances[_to] += _value;
        Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
     * Transfer with checking if it's allowed
     */
    function transferFrom(address _from, address _to, uint256 _value) public canTransfer returns (bool success) {
        if (balances[_from] < _value || allowed[_from][msg.sender] < _value) {
            return false;
        }
        allowed[_from][msg.sender] -= _value;
        balances[_from] -= _value;
        balances[_to] += _value;
        Transfer(_from, _to, _value);
        return true;
    }

    /**
     * Default balanceOf function
     */
    function balanceOf(address _owner) public constant returns (uint256 balance) {
        return balances[_owner];
    }

    /**
     * Default approval function
     */
    function approve(address _spender, uint256 _value) public returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * Get user allowance
     */
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    /**
     * Launch and retire the founder 
     */
    function launch() public onlyFounder {
        launched = block.timestamp;
        founder = 0x0;
    }
    
    /**
     * Change transfer locking state
     */
    function changeTransferLock(bool locked) public onlyFounder {
        transfersAreLocked = locked;
    }

    function() public { // no direct purchases
        revert();
    }

}
/** @title FluzFluz (FLUZ contract) **/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
}

/**
 * Get user allowance
 */