JSLint

Fixed tests for JSLint. Removed the sloppy rule and added the es5 rule
to allow use of the chai throw method.
Added document and before as globals.