Fixed some bugs and added custom main menu (not working yet)