Finished docking and fixed a few bugs along the way.