new templating system + refactored save