fixed some index errors, and added a plot at the end.

still not right (plot of J vs radius shows it wobbling a bit), but
getting closer...