Added javadocs to the web interface, and made some small refactorings and fixes.