PEP8 fixes
Cleanup imports
Starts treating certain SQLAlchemy warnings as errors and fixes the tests that failed as a result.