Factored out callFunction method into Lobby class

callFunction was moved from GameManager to Lobby class