Created helperFunction header and isComplete header.

Added isLeaf to helperFunction.