Add animation while loading.
Refactor.