Improve test coverage prior to refactor