More docking code and more tests.