Removed NodeModel factory and replaced with polymorphic object. Refactored.