Massive refactoring of the Node layer in order to support strict type checking.