Added threading to database refresh. Closes #29.