Code cleanup.
Save serial port selection to registry.