Added test_helpers, refactored tests