removed unused vars, redundant declarations, spell errors, js reserved words.
fixed naming of one char variable and indention
Merge pull request #25 from it-ony/master

Code Cleanup