Update template for new model and query interface