grc: rewrite of nports code (WIP)