Extract the Node's directory as a separate class.