DB queries working. Much debugging still in place.