Make nextLevel and reloadLevel a function