Miscellaneous uility functions from the FPMdV lab.