Refactor input and replays some more.