Refactor of WalkRemoteObjectDatabase ref writing into common class