added some smoothing to the basic control processing, and did some general cleanup