use proper varname
avoid variable and filename name clashes
don't try to create tables if can't find them
load reference sets in a way that keeps sqla happy