I moved to this formatting so it was clearer that .success and .fail were both defined, and exist on the same "level" of indenting.