Cleanup and further javadoc