Optimizations in _parse_fh

Multiple small optimizations.