Added mocha framework and more refactoring and prototyping
More changes