Cleaned up LoadingDialog code.