Add cleanup/refactor portion of #2010 for hack and Dockerfile updates

This is basically equivalent to #2010, minus the cross compilation changes.  If this gets merged, I am planning to add those in a separate pull request so we can milestone them out as a future addition (when we have time to refactor, or motivation to refactor due to pluginizing).

/cc @shykes