Adding unit tests.
Fixing lots of bugs.
Removing Q promise library.