Fix some minor mistakes

In Parent property, the maxDepth parameter pass to the contructor should
be increased 1.
In Descendents and Ancestors methods, the member variables should be
instantiated in get method.