First set of changes for making the use of templates. Things are not working yet, there seems to be an issue with using lists here, since the Graph class has a list of the Node class which in turn has a list of the Link class, it appears that the list of Link class when grown, causes some corruption of memory. This needs debugging.