refactor keyboard, pausing and cat's death