Cleaned up code after removing AsyncTasks