Fixed bugs in rpc. Added better print methods and cleaned up setup.