Created snippetService.js

Refactored out all AJAX calls to use the new snippetService module.
Renamed the snippet object to viewUtils.