Encapsulated clickhandler into a "class"