adding tests, plus a few other template adjustments