Refactor, added touch/wheel support