ability to plot orbit fit residuals. Some refactorising.