Merge core.py with various ...toolbox...py files

I implemented the `R` operator as the `r()` and `r_inv()` methods in the `DDT` class.