Separated flask app from database stuff.
Use function wrapper to control access to db.
Added Atom feed support.