Some more refactoring of assign