Added comments, minor bugfixes

Commented Code is Good Code