restructured code and added main menu scene