contract Owned {
    address public owner;
    address public newOwner;

    event OwnershipTransferred(address indexed _from, address indexed _to);
    /** @dev Assigns ownership to calling address
      */
    function Owned() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
    /** @dev Transfers ownership to new address
     *  
      */
    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    
    /** @dev Accept ownership of the contract
      */
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}
//Owned contract
function transferOwnership(address _newOwner) public onlyOwner {
    newOwner = _newOwner;
}

/** @dev Transfers ownership to new address
 *  
 */