got saving and loading templates working for the moment. Want to add loading templates from a specified file dialog selection later