Consolidated code
Autoflex programmed
Encoder rate added