Merged in threaded db calls