Adding Tarmo's changes to the cls file.
Tarmo's update to the template.