Update connection.py

Tidying up