Templates. Fixes #16