Nearly converted to use React.js