Minor changes: Make uses of extracted $data in template.php