contract StandardLockableToken is Lockable, /**/ERC223Basic, /*ERC20*/StandardToken {

  /**
    * @dev Check address is to be a contract based on extcodesize (must be nonzero to be a contract)
    * @param _address The address to check.
    */
  function isContract(address _address) private constant returns (bool) {
    uint256 codeLength;
    assembly {
      codeLength := extcodesize(_address)
    }
    return codeLength > 0;
  }

  /**
    * @dev Transfer token for a specified address
    * ERC20 support
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
  function transfer(address _to, uint256 _value) onlyUnlocked(_value) public returns (bool) {
    bytes memory empty;
    return _transfer(_to, _value, empty);
  }

  /**
    * @dev Transfer token for a specified address
    * ERC223 support
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    * @param _data The additional data.
    */
  function transfer(address _to, uint256 _value, bytes _data) onlyUnlocked(_value) public returns (bool) {
    return _transfer(_to, _value, _data);
  }

  /**
    * @dev Transfer token for a specified address
    * ERC223 support
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    * @param _data The additional data.
    */
  function _transfer(address _to, uint256 _value, bytes _data) internal returns (bool) {
    require(_to != address(0));
    require(_value <= balances[msg.sender]);
    require(_value > 0);
    // catch overflow loosing tokens
    // require(balances[_to] + _value > balances[_to]);

    // safety update balances
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);

    // determine if the contract given
    if (isContract(_to)) {
      ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
      receiver.tokenFallback(msg.sender, _value, _data);
    }

    // emit ERC20 transfer event
    emit Transfer(msg.sender, _to, _value);
    // emit ERC223 transfer event
    emit Transfer(msg.sender, _to, _value, _data);
    return true;
  }

  /**
    * @dev Transfer tokens from one address to another
    * @param _from address The address which you want to send tokens from
    * @param _to address The address which you want to transfer to
    * @param _value uint256 the amount of tokens to be transferred
    */
  function transferFrom(address _from, address _to, uint256 _value) onlyUnlockedOf(_from, _value) public returns (bool) {
    require(_to != address(0));
    require(_value <= balances[_from]);
    require(_value <= allowed[_from][msg.sender]);
    require(_value > 0);

    // make balances manipulations first
    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);

    bytes memory empty;
    if (isContract(_to)) {
      ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
      receiver.tokenFallback(msg.sender, _value, empty);
    }

    // emit ERC20 transfer event
    emit Transfer(_from, _to, _value);
    // emit ERC223 transfer event
    emit Transfer(_from, _to, _value, empty);
    return true;
  }
}
/**
 * @title StandardLockableToken
 */
function transfer(address _to, uint256 _value) onlyUnlocked(_value) public returns (bool) {
  bytes memory empty;
  return _transfer(_to, _value, empty);
}

/**
 * @dev Transfer token for a specified address
 * ERC20 support
 * @param _to The address to transfer to.
 * @param _value The amount to be transferred.
 */