LoadingDialog refactoring.