Update solve and add templates.