Basically a working RMI.
Fix merge conflicts.