Bugfixes, better division constraints, etc