+ optimisations in case of no class changes
small improvement of code readability
added touchCancel listener for touch devices