Added logic for multiple levels and game start/end.