Handled score, death, replay, buttons and some refactoring