Refactor front end to use React.js components.

Putting up this PR for visibility. Please don't merge this just yet.