refactor sphagetti api code
Add tests
Config expanded with db settings
Refactor to use couchDB
New subscription
Custom length subscription
bugfixes, db build script update
Merge branch 'refactor'

Conflicts:
	api/api.js