Move connection handling to crusti lib