Changed design to use node class