purge unnecessary code