Add test
Refactor errors to separate module for quick access