API server connection test refactored -- other small changes too