fixed the bug with saving templates where overwriting the template would insert a series of values from the array instead of adding the array itself. A little quirk of the array_splice method so I'm no longer using array_splice when overwriting a template.