Stolen AltBeacon support and some organization from https://github.com/RadiusNetworks/altbeacon-reference/blob/master/altbeacon_transmit