REFACTOR: move iterate_popen to beginning and make it proper prototype

start making sections
REFACTOR: parse and save at the same time