Refactored updateVariableDisplay method in the view controller.