Got a more OOP and less-fragile way of creating file templates