Bugfixes: more correctly use maps and exceptions.
Close connection, without auto-recovery.
Update TODO