Remove unnecessary legacy code