move everything to proper commonjs and create test framework
add doc generator
update readme