Refactoring an Application - Beginning with Rules