Added exceptions and modified constraints