Updated to support strict validation

Added "use strict"
Declared percent variable
Added missing ; terminators.

Fixes #37
Merge pull request #38 from roryprimrose/patch-1

Updated to support strict validation