Added code from Jolla TOH Developer Kit