Include some of the refactoring reverted by previous revert commit.
Include some of the refactoring reverted by previous revert commit.

KohlsTechnology/packer,ricardclau/packer,timsutton/packer,youhong316/packer,bryson/packer,rnaveiras/packer,tas50/packer,tas50/packer,paulmey/packer,ricardclau/packer,dave2/packer,mitchellh/packer,rnaveiras/packer,KohlsTechnology/packer,timsutton/packer,ricardclau/packer,rnaveiras/packer,tb3088/packer,hashicorp/packer,dave2/packer,hashicorp/packer,pecigonzalo/packer,dave2/packer,pecigonzalo/packer,grubernaut/packer,KohlsTechnology/packer,youhong316/packer,bryson/packer,youhong316/packer,hashicorp/packer,ricardclau/packer,bryson/packer,mitchellh/packer,tb3088/packer,tas50/packer,dave2/packer,grubernaut/packer,mitchellh/packer,ricardclau/packer,tas50/packer,paulmey/packer,KohlsTechnology/packer,youhong316/packer,tas50/packer,pecigonzalo/packer,grubernaut/packer,dave2/packer,timsutton/packer,mitchellh/packer,mitchellh/packer,mkuzmin/packer,dave2/packer,ricardclau/packer,pecigonzalo/packer,mkuzmin/packer,KohlsTechnology/packer,tb3088/packer,grubernaut/packer,paulmey/packer,tb3088/packer,timsutton/packer,mkuzmin/packer,tb3088/packer,paulmey/packer,paulmey/packer,youhong316/packer,paulmey/packer,grubernaut/packer,youhong316/packer,bryson/packer,mkuzmin/packer,tb3088/packer,rnaveiras/packer,grubernaut/packer,timsutton/packer,rnaveiras/packer,mkuzmin/packer,KohlsTechnology/packer,bryson/packer,hashicorp/packer,mkuzmin/packer,timsutton/packer,tas50/packer,rnaveiras/packer,bryson/packer