refactored application logic, data, and functionality

Here are some of the cleanups:

* Added missing commas, and some consistent formatting here and there
* Separated API endpoints from web endpoints for less confusion
* Separated out the logic to walk the gitignore data out of the web application server for less confusion

Perhaps we should rename walk.js to db.js or something?

What do you think about this clean up?