random commit with recent changes. Including saving new templates (needs work)