Pruning unnecessary code