Misc. Fixes

Fixes to autoconnect; to correct for an inconsistency, other misc
bugfixes and cleanup.