Made TOA calculation more sensible; fixed plot bug; many small changes.
More bugs; show_results changed phis in place.