How to Refactor and Not Break Things