Added loading state notifier. Calling UI changes only in the main thread.