Fixed errorhandler function. Doesn't print double stack trace now.
Changed how tests print, and fixed an error in defs tests.