Add pointer scroll event
Reformat code a bit