save constraints to one file and smaller templates