made some minor name changes to the exception names and overall cleanness of the code.