Saner substitution templates + val not used in column names which caused SQL syntax errors. Fixes #1.