flattened ajax calls and removed display of loading icon commented code