Refactor error value parser

The same code existed twice in two separate methods. It's now been factored out
into a single method. I still don't like it once because you could just pass it
to the next object, but what the hell.
Move refactored method to a function

Otherwise it was inside the PeakAnalyst class --> dumb