Added a reset x/y switch

Added a reset x/y switch that allows setting of the x/y values to ‘0’.
Updated the templates to receive the pin number. Refactored the code.