Added support for handling unit constraints.