Rename function subnode to find.
Add function leafp.