Added javadoc comments. Renamed several classes to match the names of the corresponding publication.