Optimizations and tweaks for sensor client; added trinket support (which required various code optimizations and commenting out unused code.)