Removing legacy code that caused problems