Tidyup JavaScript Code, better naming, put code for smooth scrolling in object method.