removed grey background of events and some trailing spaces
removed duplicate code and console output