Added content type validation.
Added max depth constraint.