Update all queries to use promises rather than callbacks