fixed namespaces bug, added complex inheritance hierarchy (with namespaces)