converted flask app to use alchemy scoped_session; added query attribute to models; cleaned things up