Commended Main Class

Commented file for easier understanding of the plugin's logic