Add formatting support to templates. Resolves #13.