connection cleanup and timeout tweaks