contract ERC223Token is ERC223Interface, StandardToken {
    using SafeMath for uint;
    bool public transfersEnabled = false;

    /**
     * @dev Transfer the specified amount of tokens to the specified address.
     *      Invokes the `tokenFallback` function if the recipient is a contract.
     *      The token transfer fails if the recipient is a contract
     *      but does not implement the `tokenFallback` function
     *      or the fallback function to receive funds.
     *
     * @param _to    Receiver address.
     * @param _value Amount of tokens that will be transferred.
     * @param _data  Transaction metadata.
     */
    function transfer(address _to, uint _value, bytes _data) returns (bool) {
        require(transfersEnabled);
        // Standard function transfer similar to ERC20 transfer with no _data .
        // Added due to backwards compatibility reasons .
        uint codeLength;

        assembly {
            // Retrieve the size of the code on target address, this needs assembly .
            codeLength := extcodesize(_to)
        }

        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        if (codeLength > 0) {
            ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
            receiver.tokenFallback(msg.sender, _value, _data);
        }
        Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
     * @dev Transfer the specified amount of tokens to the specified address.
     *      This function works the same with the previous one
     *      but doesn't contain `_data` param.
     *      Added due to backwards compatibility reasons.
     *
     * @param _to    Receiver address.
     * @param _value Amount of tokens that will be transferred.
     */
    function transfer(address _to, uint _value) returns (bool) {
        require(transfersEnabled);
        // Standard function transfer similar to ERC20 transfer with no _data .
        // Added due to backwards compatibility reasons .
        bytes memory empty;
        return transfer(_to, _value, empty);
    }


    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(transfersEnabled);
        return super.transferFrom(_from, _to, _value);
    }

    function approve(address _spender, uint256 _value) public returns (bool) {
        require(transfersEnabled);
        return super.approve(_spender, _value);
    }

    function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
        require(transfersEnabled);
        return super.increaseApproval(_spender, _addedValue);
    }

    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) {
        require(transfersEnabled);
        return super.decreaseApproval(_spender, _subtractedValue);
    }

}
/**
 * @title Reference implementation of the ERC223 standard token.
 */
function transfer(address _to, uint _value) returns (bool) {
    require(transfersEnabled);
    // Standard function transfer similar to ERC20 transfer with no _data .
    // Added due to backwards compatibility reasons .
    bytes memory empty;
    return transfer(_to, _value, empty);
}

/**
 * @dev Transfer the specified amount of tokens to the specified address.
 *      This function works the same with the previous one
 *      but doesn't contain `_data` param.
 *      Added due to backwards compatibility reasons.
 *
 * @param _to    Receiver address.
 * @param _value Amount of tokens that will be transferred.
 */