Make sqlalchemy callback-oriented
clean up
Properly import the db file depending on the config