Moving rotary encoder logic out to separate files