Fix syntax bug
Move json rpc server to end of file. Add missing import
Fix typo
Swap order of params in constructor