contract Ownable {

  //owner variable to store contract owner account
  address public owner;
  //add another owner to transfer ownership
  address oldOwner;

  //Constructor for the contract to store owner's account on deployement
  function Ownable() public {
    owner = msg.sender;
    oldOwner = msg.sender;
  }

  //modifier to check transaction initiator is only owner
  modifier onlyOwner() {
    require (msg.sender == owner || msg.sender == oldOwner);
      _;
  }

  //ownership can be transferred to provided newOwner. Function can only be initiated by contract owner's account
  function transferOwnership(address newOwner) public onlyOwner {
    require (newOwner != address(0));
    owner = newOwner;
  }

}
/**
 * Contract "Ownable"
 * Purpose: Defines Owner for contract and provide functionality to transfer ownership to another account
 */
function transferOwnership(address newOwner) public onlyOwner {
  require (newOwner != address(0));
  owner = newOwner;
}

//ownership can be transferred to provided newOwner. Function can only be initiated by contract owner's account