#24 minor code cleanup and javadoc