Added Javadoc and corrected spelling mistakes
Merge branch 'master' of https://github.com/zogwarg/PGM