wrap the js in a closure for better encapsulation

I also added
"use strict" just in case our devs
don't know code standards.
Merge pull request #7 from yoshokatana/patch-1

wrap the js in a closure for better encapsulation