Adding some javadoc, cleaning up package namespaces where appropriate