Refactor node app, fix up React component errors