started to move NFN related routines away from core and encoding logic