contract Owned {
  address public ownerA; // Contract owner
  bool    public pausedB;

  // Constructor NOT payable
  // -----------
  function Owned() {
    ownerA = msg.sender;
  }

  // Modifier functions
  // ------------------
  modifier IsOwner {
    require(msg.sender == ownerA);
    _;
  }

  modifier IsActive {
    require(!pausedB);
    _;
  }

  // Events
  // ------
  event LogOwnerChange(address indexed PreviousOwner, address NewOwner);
  event LogPaused();
  event LogResumed();

  // State changing public methods
  // -----------------------------
  // Change owner
  function ChangeOwner(address vNewOwnerA) IsOwner {
    require(vNewOwnerA != address(0)
         && vNewOwnerA != ownerA);
    LogOwnerChange(ownerA, vNewOwnerA);
    ownerA = vNewOwnerA;
  }

  // Pause
  function Pause() IsOwner {
    pausedB = true; // contract has been paused
    LogPaused();
  }

  // Resume
  function Resume() IsOwner {
    pausedB = false; // contract has been resumed
    LogResumed();
  }
}
function Owned() {
  ownerA = msg.sender;
}

// Constructor NOT payable
// -----------