Reworked instance variable creation to use a local method.