rm legacy code