cleanup, refactor and using ofEvents