first pass at modularizing core
add an example mocha test
Merge pull request #2 from engijs/browserify

first pass at core modularization; unit test