Original 0.3.5 Nightscout code