Accept classes as strings
Easier mocking
Extracting some methods for easier mocking
highest exception is now RPCException, to avoid conflicts with ruby's Exception