moved layout.ejs and refactored the script-loading in the main view