Add in simple templating functionality. Fixes #36.