Adds some very basic tests
Reworks errors to be more informative and to be easier to customize