Refactoring Dock integration