Probably can just move these inside your closure below.

Also, I don't think incrementLoadingBar is used anymore.