Remove all legacy code