events and states are now properties, code cleanup
typo fix and call to constructor