Implementing snippet templating. Not finished.