Add some javadocs, fix some layout issues.