Added reset method
Make code slightly easier to read
Removed reference to direction input and pin
Changed some configuration values