Removal of useless code