Move error checking out to helper mix-in.
Add some more autoloading.