cleanup of improper code in agTestWriter