adapt templates and add styles