Modifications to the names. Added comments. Added exceptions.