Properly scope pings to servers, refactor several to_api_format methods