Added isLeaf() and renamed length() to size().