Replace templates with updated versions

They are not optimal at all, but at least work