slimmed code and restructured folders.
switched to nodeunit and rewrote tests