Added java class for nodes