Added MAXDEPTH limit

* Fixes to web function to get full results