merging in analog sensor support and various other fixes