Added "use strict" and fixed undeclared variable errors.
Merge pull request #20 from deant/patch-1

Added "use strict" and fixed undeclared variable errors.