Correct import name to be package+referencetype's name
Refactor to use IDDeclaration and explicit Attributes classes for relevant types