Better support for nested types, and aliases