Moved map scrolling into its own function with its own sanity checks.