Create an ordered list of "leaf" functions
It's hard to move functions when they call other not-yet-ported functions. To help porting, create a list of most independent/isolated functions (functions that don't call any functions not yet on the list).