ENH: Better depth weighting, inverse testing Edit

From #343.