Adding scan and scroll functionality