Refactored for working dock widget