switched to sqlalchemy orm way of designing db
updated views to match models update (removed many explicit db queries)
fixed to match orm way of writting models and views
fixed to match orm way of writting models and views
fixed to match orm way of writting models and views