changed the norm to the max norm and refactored the constraints class.