Remove unnecessary assignments