Moved test to unit, added TestHelper, refactoring