Fixed some bugs with pebble, abstracted sec from midnight conversions into models and Time class, improved robustness of pebble response particularly before or after school