Added constraints and edited pats_structure