Added Common function to getDeviceType
Device type is sent to Huddle Engine in Handshake message
minor bugfixes