Refactored name property.
Refactored element retrieval.
Updated -elements to return only top level elements.
-elements only returns top level elements. Added -allElements to return them sans hierarchy.