Add some javadoc, convert keySet loops to entrySet loops
Merge pull request #57 from bencomp/master

Add some javadoc, convert keySet loops to entrySet loops