Test Friendly refactor