Fixed unit tests
Half-way through refactoring to make errors its own module - needs further work