Implement initializeVariables.