Write test for errors
Rename exceptions