Pebble functionality refactoring