Added javadoc and inline comments to all classes and methods.