Move exceptions to module itself to ease managing exceptions