Refactor value extraction off StopIteration

This was way too close to the C code, which doesn't have lovely exception handling like we do.