Refactor prompts and keyget.