config fixes and sqlalchemy imports