Pushing some speed improvements to ajax