Fixing the linear-constraint branch, preparing for a merge with master.