REDCORE-171 #comment Improve packager to avoid unnecessary variables