Comments

Added comments to every section
Cleaned up some code