TypingGame and some refactoring