Outerjoin rather than join, because not all packages belong to a packagegroup
Improve naming of variables
Update package template
Update packages template