Rewrote main menu code. It still doesn't work though.