refactor app.js
added post status migration
refactoring digest
refactoring subscriptions