Add unittest2 requirement
Refactoring, adding tests