Cleaned up service determination for check_service