Apply some fixes in load_data; add plot_threshold.