Add comments and clean-up code

Removed irrelevant comments and added new ones pertaining to licensing. Also, removed a few lines of nonfunctional code left behind after a previous edit.