Now refactored to feature the ng-pouchdb library
which was created to extract the main functionality of this app into a reusable library.