minor refactoring, comment and javadoc changes, redundant code removals