Modified Exception type.

Others:
Fixed variable names to stop reassignment.
Updated: copyright comments.