Refactor Depth object, use 2 dimensional array instead.