and a test for emebed not found and did some test source refactoring