Introduce proper error handling
Beautify the test suite