Minor improvements to hpc code