lots of refactoring and enriching of nodes