Real, actual success

Made things work, plots look a little icky because of possible bad data.
But that's okay.  Also cleaned the code up pretty well.