Template completion