Updated the javadocs and moved UndoCommand to rpc package.