Support multi activities in templates.
Support multi activities in model, and fix bug about speed.