split out template into individual files