remove unused legacy code