Cockatoo refactoring