small changes to ajax loader, making async