segmentation of template files

Signed-off-by: Alexander Skjolden <alex@plastboks.net>