Re-order subroutines in HFI_plot for better compiling.