add turbolinks to static layout and refactored js to cope