RPCResult replaced by exceptions; failed task detection; refactoring