general clean up with assistance from UCDetector, javadocs, light refactoring