Modularized and slightly cleaned up

Moved a bunch of functions from url.js to helperMaster.js. This file is then imported into url.js. This makes it cleaner. Some changes to app.js as well, just in how it handles errors.