restructured node and link information extraction into multiple functions