Added scroll event handling