Node matrix refactor