Removed unused variables and updated commenting
Merge pull request #1103 from b1nd/merge

Removed unused variables and updated commenting