Added functions to Connection, improved Identity.