I am using D3.js to create a Dynamic Tree Chart, it starts with one node and then you can add/remove nodes as you want. You can also edit the node text to match your criteria.
So adding nodes it's working perfectly with the exception that it doesn't draw links far from depth 1... Which is annoying because I can't find the reason, I've tried everything I imagined.
Also, I can't remove a node, also tried everything I knew, searched almost everywhere but couldn't find some sample code to work on...
This is my tree

As you can see, links are only working for Depth 1. Also, it has a red button (REMOVE NODE) and a green button (ADD NODE)
I am really upset because I've been working on this two things which aren't working for 6 or 7 hours... I think I'm going to throw it and use simple input boxes with some CSS3 tricks, but isn't cool...
I've created a fiddle with my full code for this, I hope you can help me out.
http://jsfiddle.net/wt8cd6hh/