Added ability to use custom templates and extended deps syntax.