Refactory of weak constraints.
Implemented bcd.