Update to swich class to allow CURL object to be closed