Re-factor code to make assignments less wordy.