Adding comments for assistance.

This commit adds javadocs & comments to the code, to ensure everyone
knows what everything does.