Improve the style and comments of Connection