Removing unused codes