Moved methods that access database into AsyncTasks

Moved remaining methods that cause database transactions into AsyncTasks.