Refactor hFDR code, and reformat hFDR output.