Refactor, replace RPC with HTTP API

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>