fixed helpers import, added tests, code cleanup