implemented splash screen and menu. Did some code cleaning.