Further refactoring of dock in progress