Rename toArray to getTree
Added parameter and argument traits