Using analog pins for controling the driver
Minor code refactoring