Refactors test, moves helpers to helper