Refactor some templates
Docs
Update contrainsts
Docs