removal of unnecessary code