Rework javascript, add scrolling