Removed non-existent variable
Allow for further reuse of editor templates
Warn about possible issues
Simplified error handling