fixed class syntax and namespaced events