Serving templates

This PR adds the functionality we are extracting from Sheer, plus improvements to code quality, test coverage, and a more complete README.