Inherit from more specific built-in exception
Refactor
Implement IDS
Change test cases

To better suit Python's slowness.