Captain Joshua W. Cooper, USN Becomes Commanding Officer