Remove legacy code