remove unused imports
adapt _do_sourced to new error messages
rename test file