added state system; added main menu screen; implemented exit button on main menu screen