Pretty printing rpc.cast and networks

Almost no code changes, all tests passed