Refactored naming of variables to make more readable ; Refactored isConnected() method