Added javadoc comments to Main class

Javadoc comments for:
- Main class.
- Main class attributes.
- Main class methods.
Try to keep the lines at a sensible length (~120 columns)