Improved the XSL by using templates.