Modularising code sections for use in the template.