Deleted double interrupts for encoders and some changes