Templating lib and layout base