Added better comments. UNTESTED
Removed unnecessary variable declaration. UNTESTED