contract Escapable is Owned {
    address public escapeCaller;
    address public escapeDestination;

    /// @notice The Constructor assigns the `escapeDestination` and the
    ///  `escapeCaller`
    /// @param _escapeDestination The address of a safe location (usu a
    ///  Multisig) to send the ether held in this contract
    /// @param _escapeCaller The address of a trusted account or contract to
    ///  call `escapeHatch()` to send the ether in this contract to the
    ///  `escapeDestination` it would be ideal that `escapeCaller` cannot move
    ///  funds out of `escapeDestination`
    function Escapable(address _escapeCaller, address _escapeDestination) {
        escapeDestination = _escapeDestination;
        escapeCaller = _escapeCaller;
    }

    /// @dev The addresses preassigned the `escapeCaller` role
    ///  is the only addresses that can call a function with this modifier
    modifier onlyEscapeCallerOrOwner {
        if ((msg.sender != escapeCaller)&&(msg.sender != owner))
            throw;
        _;
    }

    /// @notice The `escapeHatch()` should only be called as a last resort if a
    /// security issue is uncovered or something unexpected happened
    function escapeHatch() onlyEscapeCallerOrOwner {
        uint total = this.balance;
        // Send the total balance of this contract to the `escapeDestination`
        if (!escapeDestination.send(total)) {
            throw;
        }
        EscapeCalled(total);
    }
    /// @notice Changes the address assigned to call `escapeHatch()`
    /// @param _newEscapeCaller The address of a trusted account or contract to
    ///  call `escapeHatch()` to send the ether in this contract to the
    ///  `escapeDestination` it would be ideal that `escapeCaller` cannot
    ///  move funds out of `escapeDestination`
    function changeEscapeCaller(address _newEscapeCaller) onlyEscapeCallerOrOwner {
        escapeCaller = _newEscapeCaller;
    }

    event EscapeCalled(uint amount);
}
/// @dev `Escapable` is a base level contract built off of the `Owned`
///  contract that creates an escape hatch function to send its ether to
///  `escapeDestination` when called by the `escapeCaller` in the case that
///  something unexpected happens
function Escapable(address _escapeCaller, address _escapeDestination) {
    escapeDestination = _escapeDestination;
    escapeCaller = _escapeCaller;
}

/// @notice The Constructor assigns the `escapeDestination` and the
///  `escapeCaller`
/// @param _escapeDestination The address of a safe location (usu a
///  Multisig) to send the ether held in this contract
/// @param _escapeCaller The address of a trusted account or contract to
///  call `escapeHatch()` to send the ether in this contract to the
///  `escapeDestination` it would be ideal that `escapeCaller` cannot move
///  funds out of `escapeDestination`