Refactor parse_file to extract reading heap objects a helper function.
Refactor parse_file to extract reading heap objects a helper function.

This further decouples the code for adding an object to a heap from parsing
the heap objects.

csfrancis/harb