Refactored scroll to top