Removed need of global variable currentScreenName