Remove unnecessary code from assignment