WIP: improve collector interface
WIP: scope last globals in main func