Remove unnecessary legacy code.