Changes in pull up functions
Encoder handler added