Duplicate of the edit tmpl :(
Changed edit to new
Removed debugging code