general clean up in core module with assistance from UCDetector, javadocs, light refactoring