rework of existing templating to seperate concerns, mostly removing JS from the views and extras from the views