Refactored, shored up tests