Further optimizing of ajax calls