Refactorized client and server for exposing any remote objects, keeping the special iterable case for bulk caching