Clean up Pebble code