Fixed unit tests and classloader return value

The testError() test still fails. I left it in, because I am not sure what it should test.