Merge Patricks changes on constraints into OTF master