Moved code from objectstoreviewer into common core library