Identifying 'code errors' or cognitive distortions and learning how to rewrite internal scripts.