refactors to remove test setup bits