Removing legacy code