tidy up the code
#7: changed structure to get node-objects in sync from its class