adding comment on js code and fixing the scroll to top not working