Clean up and javadocs