Mako -> Jinja2 conversion + api doc clean up.