Added State to the node and also added more documentation