De-macro-ize and move internal some hpc helpers.