Added comments.
added comments.
Moved main method for simple JAR export.