Reworked the how the control works

Seperated a few functions to a TouchscreenFunctions.h file