4th Commit

Commented on each set of functions.
removed a lot of useless variables.