Template improvements, including a complete rework of /tools/editor