Adding support code for RPC.
repl uses the rpc now.
Correcting issues with break and reset.