Disable sqlalchemy debug messages
Remove unused import
Move sql requests into defertothread