a little code cleanup for readability
Merge pull request #35 from raykendo/master

js code cleanup