cleaned up new thread code and sensor update scheduling