More refactoring. Made helper module for tests and place test base class in there