Minor cleanup, and javadocs