Move clickEvents out of View class