reorganizing for mocha tests and more