Proper handling of package references
(cherry picked from commit 6add585)
Merge pull request #3 from pnml/packages

Proper handling of package references