Added footer (backup warning)
updateDepth is now recursive