refactor of http://code.google.com/p/path-of-exile-skilltree-planer/