Re-factored smoothScroll to more concise logic