Cleaning up some ajax calls