Hacked up run.js so db is definitely loaded by time onLoad is run. Need to clear up