Refactor to use react.

This thing no longer asks for input with popups and prints to the
console. It's like a real web application!