Fixed a few small issues and put the plugin in strict mode.