Updated constraint handing to be more efficient