Clean up port rotation code, adjust docking safety factor.