Updated code for Pebble 2.0 SDK