Refactoring
Further refactoring, defs of node and edge - to be used further on categorical classifiers