Move function definitions inside module exports
Move some functions back out of module exports
Update .jshintrc file to ignore beforeEach global
Update tests to test for overwriting
Update module to pass new test requirements