Indentation and ajax calls for all functions