Made database operations asynchronous.