move BinaryNode's implementation to models module