tweaking the behavior slightly and code cleanup

instead of only switching the output device when the knob is at either end, it now switches it if it's anywhere on either side (with a certain tolerance around the middle it ignores).