Pebble and phone v2.0

Updated javascript and c to work with the new web UI.