Adds Reference support
optimize imports
Merge pull request #9 from Tpt/reference

Adds Reference support