add comments/documentation to the code

This commit adds some documentation to the code in the form of
comments.  Comments are not yet complete, but wanted to hold off since a
refactor is planned in the near future.  The refactor will modularize
the code a bit, particulary the swing components.