Declaring the currentWorkPanel to avoid creating a global variable.