KD-Tree and Ball tree added in a unified interface