Updated TriedNodeFactory references to use interface

Tried to implement my own factory but the Nodes have a hard dependency on the factory. Updated to use interface so I can implement my own factory.