Make use of a reference db easier to toggle and be more configurable

Add a simple flag to toggle the use of a reference db file, as well as a config var to set the db file name