Refactoring! It should work, sort of...