Function to initialize nodes: added option to initialize from array of internodes
Function to initialize nodes: commented