Simplify events lists and add code formatting