Change switch in mainMenu.c by a lot of if and functions