i have a theme engine module that i use which is part of a suite of modules that together, provide a frontend, or 'markup' api.
The Theme Engine handles things like the body classes and is basically a wrapper module for a collection of functions/methods helpful for optimizing front end development. It includes helpers for webfonts and facilitates the handling of the site assets, enabling each template to add dependencies (js or css files, or inline scripts/styles), as well as acting as a wrapper for ProCache whereby it allows the developer to enable/disable ProCache minification as needed. For example, superusers may disable minification and the module will output the individual assets with a url paramter appended to prevent caching. It also provides a simple 'hook' system where the developer can add containers to the main template, into which templates can 'inject' markup, similar to Wordpress do_action.
The Meta Engine reads settings from a settings module where the admins can enter the primary settings for the site, such as site title, copyright year and holder, publisher, social media links, contact information and more and provides an easy API to access those settings, as well as formatting for convenience. It also allows for individual templates to add and modify items to the header and footer, such as prefetch/prerender, next/prev, schema, open graph tags, custom favicon sets, and any custom markup.
other members of the suite are a Blog Engine, and Events/Calendar Engine.