Removed unnecessary call to window.scroll()

*Also added minified code