kde added

- kde using single tree added
Just in the case that this code needs to be modified or tested some time, I normally prefer to write every implementation in the cpp files. Compilation after making even the smallest modification in a header takes time. Keep it here if you prefer though.