Clean up
Add some more javadoc