Fixed change in template example and other minor fixes.
Fixed template example.