Refactor refresh action to be callable from Pebble