Splitting jsonrpc.js by classes
Bugfix: memory leak