feat(packages) - create packages

SD-923
SD-1036
SD-927
SD-1027
SD-925
SD-1039
While the performance differences are minor I find it more expressive to do the check in the first loop.