Made the node class a nested class