Split project into lib, started using mocha.