Removal of inefficient code