Template analyses now supported. Also some minor fixes for graphs.