Minor refactoring
Minor refactoring
added loading indicator