Updated to use r42d's new depth system.