Refactored servlets to not be dependent on API
Added preliminary support for JSON-RPC