Tree structure modified
Added pythonic interface