Improved indentation when isValid consists of more than one row.
Removed dead code.
Ensure expanded imports are added.
Cleaned up imports.
Now possible to expand more than one attribute with same type.
Improved error message when cyclic references.