Use OrderedDict to keep the headers in place; use a DEFAULT_TEMPLATE constant instead of a dictionary.