Move initializeGenerator() into private class.