Refactor out show/hide loading spinner

Change-Id: If505a46f54921ce4742ecfed598eb07a9ba5e3eb
Merge "Refactor out show/hide loading spinner"