Replaced -l with short list and added -L for long list
Sort connections when listing
Fixed perform_sudo() for some sudo prompt cases