Removed 'process.exit' from code that was not specific to being run on
NodeJS.  Instead replaced it with 'throw new Error' so eventually the server
will be able to work in the browser.  Also updated some comments.