Getting initial encoders to work. Main loop/control mechanism is too complicated but works.