Refactor. Exceptions as new package.