refactored node and diff node to have a parent class - AbstractNode