WIP: Adding API handlers

To replace the RpcHandlers