Merged actual fixes into code templates

Added the fixes that where discussed in the forum in the past three
weeks  to the template files. Templates are now up-to-date.