Refactor spinner show/hide