Got the menu working. Sorry for the little bugs. I used the code provided as it is
Fixed the previous code with a seg fault