Fixed finding types out of types with element types. Added a few helper functions for adding attributes