Wrapping all JS into a closure

Fixes #29.