Improved compat with Debian/Ubuntu based distros, template will not generate unneeded blank lines

Also modified template to use @ in variables following style guide.