Moved shared code from base template to includes