Streamline the refactoring
Fix test