Simplified depth calculations.