Refactored to move stuff around.  Also fixed issue with thread that
sends requests to hardware.