cleaned up layout html and split out to common jinja files