Fixed variable scope
Added options to generate multiple instances
Changed one more .equal to .strictEqual
Fixed lint errors