Remove unused error class
A few small refactors