Node class refactor

refactored the node class for the best compatibility