Fixed unsatisfiable constraint issue #981

Removed fixed width constraints
Cleaned up code