Upgraded Pebble code to 2.0 compatible