diff --git a/reclass/storage/tests/test_yamldata.py b/reclass/storage/tests/test_yamldata.py
new file mode 100644
index 0000000..d8129ce
--- /dev/null
+++ b/reclass/storage/tests/test_yamldata.py
@@ -0,0 +1,37 @@
+#
+# -*- coding: utf-8 -*-
+#
+# This file is part of reclass (http://github.com/madduck/reclass)
+#
+
+from reclass.storage.yamldata import YamlData
+
+import unittest
+
+class TestYamlData(unittest.TestCase):
+
+    def setUp(self):
+        lines = [ 'classes:',
+                  '  - testdir.test1',
+                  '  - testdir.test2',
+                  '  - test3',
+                  '',
+                  'environment: base',
+                  '',
+                  'parameters:',
+                  '  _TEST_:',
+                  '    alpha: 1',
+                  '    beta: two' ]
+        self.data = '\n'.join(lines)
+        self.yamldict = { 'classes': [ 'testdir.test1', 'testdir.test2', 'test3' ],
+                          'environment': 'base',
+                          'parameters': { '_TEST_': { 'alpha': 1, 'beta': 'two' } }
+                        }
+
+    def test_yaml_from_string(self):
+        res = YamlData.from_string(self.data, 'testpath')
+        self.assertEqual(res.uri, 'testpath')
+        self.assertEqual(res.get_data(), self.yamldict)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/reclass/storage/yamldata.py b/reclass/storage/yamldata.py
index 6894308..b28db06 100644
--- a/reclass/storage/yamldata.py
+++ b/reclass/storage/yamldata.py
@@ -68,13 +68,17 @@
         exports = datatypes.Exports(exports)
 
         if name is None:
-            name = self._path
+            name = self._uri
 
         env = self._data.get('environment', None)
 
         return datatypes.Entity(classes, applications, parameters, exports,
                                 name=name, environment=env, uri=self.uri)
 
+    def __str__(self):
+        return '<{0} {1}, {2}>'.format(self.__class__.__name__, self._uri,
+                                       self._data)
+
     def __repr__(self):
-        return '<{0} {1}, {2}>'.format(self.__class__.__name__, self._path,
+        return '<{0} {1}, {2}>'.format(self.__class__.__name__, self._uri,
                                        self._data.keys())
