Clean up RefreshCommand and StaplerServiceProvider.

Cleaned up a couple of bugs in the RefreshCommand and
StaplerServiceProvider.