o. Fix bunch of bugs.
o. Add unit-test infrastructure