Major changes to add TinyG support