Js ol to constructor

refactored js and made some edits to make the site functional