moving event assignment to classes
cleaning up classes