Cleanup tree drag and drop method.
Fix some arrays