Once again tests help make a refactor much faster