Start adding rpc and unit tests