Updated potentiometer

neatened up the coade
Neatened Up code

Simon changed variable names and order
More neat

easier to read and understand