linted main file, slightly improved tests, added npm scripts for testing and linting