partially fulfilled eliminating duplicate code in grid_fit() and in plot_excess().  lots of clean-up needed