Fixing failed merge
php 5.3 support
The factory now gets the right node (depth)