Add Connection class to replace the Edge class