refactoring and cleanup; preparation for DiscView