Simplify a method
Remove unused exception class