Refactoring to remove extra instance variables.