java. Cleaned up rpc and http code, fixed #131.