Refactored code related to instance variables that are collection classes.