A lot of Misc bug fixes.
Added more of Koza's functions. Add subtree deletion and duplication