contract YouCollectBase is Owned {
  using SafeMath for uint256;

  /*** CONSTANTS ***/
  string public constant NAME = "Crypto - YouCollect";
  string public constant SYMBOL = "CYC";
  uint8 public constant DECIMALS = 18;  

  uint256 public totalSupply;
  uint256 constant private MAX_UINT256 = 2**256 - 1;
  mapping (address => uint256) public balances;
  mapping (address => mapping (address => uint256)) public allowed;

  event Transfer(address indexed _from, address indexed _to, uint256 _value); 
  event Approval(address indexed _owner, address indexed _spender, uint256 _value);

  /// @dev Required for ERC-20 compliance.
  function name() public pure returns (string) {
    return NAME;
  }

  /// @dev Required for ERC-20 compliance.
  function symbol() public pure returns (string) {
    return SYMBOL;
  }
  /// @dev Required for ERC-20 compliance.
  function decimals() public pure returns (uint8) {
    return DECIMALS;
  }

  function transfer(address _to, uint256 _value) public returns (bool success) {
      require(balances[msg.sender] >= _value);
      balances[msg.sender] -= _value;
      balances[_to] += _value;
      Transfer(msg.sender, _to, _value);
      return true;
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
      uint256 allowance = allowed[_from][msg.sender];
      require(balances[_from] >= _value && allowance >= _value);
      balances[_to] += _value;
      balances[_from] -= _value;
      if (allowance < MAX_UINT256) {
          allowed[_from][msg.sender] -= _value;
      }
      Transfer(_from, _to, _value);
      return true;
  }

  function balanceOf(address _owner) public view returns (uint256 balance) {
      return balances[_owner];
  }

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

  function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
      allowed[msg.sender][_spender] = _value;
      Approval(msg.sender, _spender, _value);

      require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData));
      return true;
  }

  function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
      return allowed[_owner][_spender];
  }   


  // Payout
  function payout(address _to) public onlyCLevel {
    _payout(_to, this.balance);
  }
  function payout(address _to, uint amount) public onlyCLevel {
    if (amount>this.balance)
      amount = this.balance;
    _payout(_to, amount);
  }
  function _payout(address _to, uint amount) private {
    if (_to == address(0)) {
      ceoAddress.transfer(amount);
    } else {
      _to.transfer(amount);
    }
  }
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ConsenSys/Tokens/blob/master/contracts/eip20/EIP20.sol
// ----------------------------------------------------------------------------
function symbol() public pure returns (string) {
    return SYMBOL;
  }
/// @dev Required for ERC-20 compliance.