Added type.ns function for creating namespace objects.