NodeGrid fixes

Adds license
Removes unneded matrix
replaces std::for_each with for range-loop