Deleting redundant code