Removes useless and hermful perm changes.