port to GNU Radio v3.7 and restructure code