formatting tweaks, template style rewrite