Document:

Exhibit

Exhibit 10.2

SECOND AMENDMENT TO
AMENDED AND RESTATED CREDIT AGREEMENT
This Second Amendment to Amended and Restated Credit Agreement (this “Second Amendment”) is executed as of July 15, 2016, by and among BLUEKNIGHT ENERGY PARTNERS, L.P., a Delaware limited partnership (the “Borrower”), WELLS FARGO BANK, NATIONAL ASSOCIATION, as administrative agent (“Administrative Agent”), and the Lenders (as defined below) party hereto.
W I T N E S S E T H:
WHEREAS, Borrower, Administrative Agent and the financial institutions party thereto (“Lenders”) are parties to that certain Amended and Restated Credit Agreement dated as of June 28, 2013 (as amended by that certain First Amendment to Amended and Restated Credit Agreement, dated as of September 15, 2014, by and among Borrower, the Administrative Agent and the Lenders party thereto, and as otherwise amended prior to the date hereof, the “Credit Agreement”) (unless otherwise defined herein, all terms used herein with their initial letter capitalized shall have the meaning given such terms in the Credit Agreement, as amended hereby);
WHEREAS, Charlesbank Capital Partners, LLC and Vitol Holding B.V. (collectively, the “Existing Sponsors”) are the existing indirect owners of 100% of the voting Capital Stock of the General Partner;  
WHEREAS, the Existing Sponsors, the General Partner and the Borrower (or their respective affiliates) intend to enter into one or more agreements with Ergon, Inc., a Mississippi corporation (“Ergon”), or an affiliate thereof, pursuant to which (i) a wholly-owned subsidiary of Ergon (“Newco”) will purchase 100% of the outstanding voting Capital Stock of Blueknight GP Holding, L.L.C., which owns 100% of the outstanding Capital Stock of the General Partner (the “GP Acquisition”) pursuant to a Membership Interest Purchase Agreement (the “GP Purchase Agreement”) and (ii) the Borrower shall issue approximately 18,312,968  new Series A Preferred Units to Newco or an affiliate of Ergon in exchange for 100% of the Capital Stock of a Subsidiary of Ergon that owns the nine asphalt terminals identified on Schedule 1 to the Ergon Contribution Agreement (as defined below) (the “Ergon Terminals”) and cash expected to be $16,000,000 (but in any event no less than $10,000,000) concurrently with the repurchase by the Borrower of approximately 13,335,390 of its Series A Preferred Units currently owned by the Existing Sponsors or affiliates thereof (the “Exchange Transaction”, together with the GP Acquisition, the “Ergon Transactions”) pursuant to a Contribution Agreement (the “Ergon Contribution Agreement”) and a Preferred Unit Repurchase Agreement (the “Preferred Unit Repurchase Agreement”, together with the GP Purchase Agreement and the Ergon Contribution Agreement, the “Ergon Transaction Agreements”);
WHEREAS, the Borrower has requested the Administrative Agent and the Required Lenders to enter into this Second Amendment to amend certain terms of the Credit Agreement to, among other things, permit the Ergon Transactions, such amendments as set forth herein to be effective as of the Second Amendment Effective Date (as defined below).

1

NOW THEREFORE, for and in consideration of the premises and the mutual covenants and agreements herein contained and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, Borrower, Administrative Agent and the Lenders party hereto hereby agree as follows:
SECTION 1.    Amendments.  In reliance on the representations, warranties, covenants and agreements contained in this Second Amendment, and subject to the satisfaction of the conditions precedent set forth in Section 2 hereof, the Credit Agreement is hereby amended, effective as of the Second Amendment Effective Date, in the manner provided in this Section 1.
1.1.    Amendment to Definitions.  Certain definitions contained in Section 1.1 of the Credit Agreement are hereby amended as follows:
(a)    The definition of “Acquisition Consideration” contained in Section 1.1 of the Credit Agreement is hereby amended by adding the text “(including the dollar amount of any Capital Expenditures made within 90 days of such Permitted Acquisition (or 120 days of the Ergon Transaction Effective Date with respect to the Ergon Transaction) by any Group Member to improve any property acquired in connection with such Permitted Acquisition pursuant to a plan in place by the Group Members submitted to, and approved by, the Administrative Agent prior to the closing of such Permitted Acquisition)” immediately following the second reference to “Permitted Acquisition” contained in such definition and immediately before the text “, whether paid in cash or by exchange of Capital Stock” contained in such definition. 
(b)    The definition of “Change of Control” contained in Section 1.1 of the Credit Agreement is hereby amended by:
(i)     amending and restating clause (b) thereof in full as follows:
“(b)     (i) at any time prior to the Ergon Transaction Effective Date, Mark Hurley, Vitol and Charlesbank, collectively, cease to Control and own, directly or indirectly, 50% or more of the issued and outstanding voting Capital Stock of the General Partner and (ii) at any time on or after the Ergon Transaction Effective Date, Ergon ceases to Control and own, directly or indirectly, 50% or more of the issued and outstanding voting Capital Stock of the General Partner; or”
(ii)    amending and restating the proviso at the end of clause (c) thereof in full as follows:
“provided that, notwithstanding the foregoing, any changes to the composition of individuals serving as members of the board of directors or other equivalent governing body of the General Partner approved by (i) Vitol and Charlesbank prior to the Ergon Transaction Effective Date or (ii) Ergon on the Ergon Transaction Effective Date shall not constitute a “Change of Control” hereunder”

2

(c)    The definition of “Consolidated EBITDA” contained in Section 1.1 of the Credit Agreement is hereby amended by replacing the text “any Permitted Acquisition” contained in clause (f) thereof with the text “any acquisition not prohibited by this Agreement (whether or not such acquisition is consummated)” in lieu thereof.
(d)    The definition of “Consolidated EBITDA” contained in Section 1.1 of the Credit Agreement is hereby further amended by amending and restating the definition of “Material Acquisition” therein in full as follows:
““Material Acquisition” means any acquisition of property or series of related acquisitions of property that (a) constitutes (i) assets comprising all or substantially all of an operating unit of a business, (ii) all or substantially all of a stand-alone operating facility or facilities of a Person or (iii) all or substantially all of the common stock of a Person and (b) involves the payment of consideration by the Borrower and its Restricted Subsidiaries involving Acquisition Consideration in excess of $10,000,000; provided that, for the avoidance of doubt, the parties hereto agree that the acquisition of the Ergon Terminals in connection with the Ergon Transactions shall be deemed to be a Material Acquisition pursuant to the terms and provisions of this Agreement;”
(e)    The definition of “Consolidated EBITDA” contained in Section 1.1 of the Credit Agreement is hereby further amended by amending and restating clause (B) contained in the final paragraph of such definition in full as follows:
“(B) the aggregate amount of all Material Project Consolidated EBITDA Adjustments during any period shall be limited to 20% of the total actual Consolidated EBITDA of the Borrower and its Restricted Subsidiaries for such period (which total actual Consolidated EBITDA shall be determined without including any Material Project Consolidated EBITDA Adjustments).”
(f)    The definition of “Defaulting Lender” contained in Section 1.1 of the Credit Agreement is hereby amended by amending and restating clause (d) thereof in full as follows:
“(d) has, or has a direct or indirect parent company that has, become the subject of a Bankruptcy Event or a Bail-In Action.”
(g)    The first sentence of the definition of “Eurodollar Base Rate” contained in Section 1.1 of the Credit Agreement is hereby amended and restated to read in full as follows:
“with respect to each day during each Interest Period pertaining to a Eurodollar Loan, the rate per annum determined on the basis of the rate for deposits in Dollars for a period equal to such Interest Period commencing on the first day of such Interest Period appearing on the Reuters Screen LIBOR01 Page as of 11:00 A.M., London time, two Business Days prior to the beginning of such Interest Period; provided that for the purpose of determining the Eurodollar Base Rate, if the Eurodollar Base Rate would be less than zero, such rate shall be deemed to be zero for all such purposes.”

3

(h)    The definition of “Loan Documents” contained in Section 1.1 of the Credit Agreement is hereby amended and restated to read in full as follows:
““Loan Documents”:  this Agreement, the First Amendment, the Second Amendment, the Security Documents, the Notes, the Letters of Credit, the Letter of Credit Agreements, and any amendment, waiver, supplement or other modification to any of the foregoing.”
(i)    The definition of “Permitted Acquisition” contained in Section 1.1 of the Credit Agreement is hereby amended by (i) replacing clause (a) of such definition with the text “(a) acquisition of all or substantially all of (I) the property of any Person, (II) a stand-alone operating facility or facilities of a Person or (III) any business or division of any Person;” in lieu thereof and (ii) inserting the text “, operating facility or facilities” immediately after the text “the Person” contained in clause (ii) of such definition and immediately before the text “or business” contained in clause (ii) of such definition.
(j)    The definition of “Pro Forma Basis” contained in Section 1.1 of the Credit Agreement is hereby amended and restated to read in full as follows:
““Pro Forma Basis”:   on a basis in accordance with GAAP and Regulation S-X; provided that, with respect to any such calculation in connection with any acquisition of property that has less than 12 months of operating history, pro forma adjustments may also be made (whether or not permitted by GAAP and Regulation S-X) for the projected net income of such property (but not any anticipated cost savings or other similar financial effects) including projected net income attributable to material agreements in favor of one or more Loan Parties to be executed in connection with the acquisition of and with respect to such property, provided that (i) the Borrower has delivered to the Administrative Agent a certificate from a Responsible Officer certifying, in good faith, that such projected net income is factually supportable (based on the operations of the property to date) and reasonably expected to be sustainable and (ii) the calculation of such projected net income shall be reasonably acceptable to the Administrative Agent.
(k)    The definition of “Specified Acquisition” contained in Section 1.1 of the Credit Agreement is hereby amended by adding the following sentence at the end of such definition thereto as follows:

4

“The parties hereto agree that the acquisition of the Ergon Terminals in connection with the Ergon Transactions shall be deemed to be a Specified Acquisition pursuant to the terms and provisions of this Agreement.”
1.2.    Additional Definitions.  Section 1.1 of the Credit Agreement is hereby amended to add the following definitions in alphabetical order to such Section:
“Account Control Agreement” shall mean, as to any deposit account, securities account or commodity account of any Loan Party held with a financial institution, an agreement or agreements, in form and substance reasonably acceptable to the Administrative Agent, among such Loan Party owning such deposit account, securities account or commodity account, the Administrative Agent and the financial institution at which such deposit account, securities account or commodity account is located, which agreement establishes the Administrative Agent’s control with respect to such account.  For purposes of this definition, the term “control” means “control” within the meaning of Article 9 of the UCC. 
“Bail-In Action”: the exercise of any Write-Down and Conversion Powers by the applicable EEA Resolution Authority in respect of any liability of an EEA Financial Institution.
“Bail-In Legislation”: with respect to any EEA Member Country implementing Article 55 of Directive 2014/59/EU of the European Parliament and of the Council of the European Union, the implementing law for such EEA Member Country from time to time which is described in the EU Bail-In Legislation Schedule. 
“Consolidated Cash Balance” means, as of any date, the aggregate amount of cash and Cash Equivalents of the Loan Parties as of such date (other than (i) any cash set aside to pay in the ordinary course of business amounts of the Loan Parties then due and owing to unaffiliated third parties and for which the Loan Parties have issued checks or have initiated wires or ACH transfers in order to pay (or will issue checks or initiate wires or ACH transfers in order to pay such amounts within three Business Days), (ii) any cash of the Loan Parties constituting purchase price deposits or other contractual or legal requirements to deposit money held by an unaffiliated third party, (iii) the aggregate amount of cash or Cash Equivalents of the Loan Parties received as proceeds of any issuance of Capital Stock; provided, that in each such case prior to the permitted application thereof, such cash is deposited in a deposit account that is subject to an Account Control Agreement, (iv) any amounts held in Excluded Accounts and (v) any amounts held as cash collateral as required pursuant to the terms of this Agreement).
“EEA Financial Institution”: (a) any credit institution or investment firm established in any EEA Member Country which is subject to the supervision of an EEA Resolution Authority, (b) any entity established in an EEA Member Country which is a parent of an institution described in clause (a) of this definition, or (c) any financial institution established in an EEA Member Country which is a subsidiary of an institution described in clauses (a) or (b) of this definition and is subject to consolidated supervision with its parent. 

5

“EEA Member Country”: any of the member states of the European Union, Iceland, Liechtenstein, and Norway.
“EEA Resolution Authority”: any public administrative authority or any person entrusted with public administrative authority of any EEA Member Country (including any delegee) having responsibility for the resolution of any EEA Financial Institution.
“Ergon”: Ergon, Inc., a Mississippi corporation.
“Ergon Contribution Agreement”: as defined in the Second Amendment.
“Ergon Terminals”: as defined in the Second Amendment.
“Ergon Transaction Agreements”: as defined in the Second Amendment.
“Ergon Transaction Effective Date”: the date upon which the Ergon Transactions close.
“Ergon Transactions”: as defined in the Second Amendment.
“EU Bail-In Legislation Schedule”: the EU Bail-In Legislation Schedule published by the Loan Market Association (or any successor person), as in effect from time to time. 
“Excluded Accounts” means deposit accounts, securities accounts or commodities accounts (a) that are used solely for (i) payroll, payroll taxes and other employee wage and benefit payments, (ii) withheld taxes, (iii) any fiduciary or trust purposes or (iv) restricted cash collateral where the deposits or proceeds of such account are used exclusively to support letters of credit and similar arrangements, obligations in respect of Swap Agreements and/or obligations in respect of treasury, depositary, purchasing card or cash management services, or (b) with an average daily balance as of the end of the most recently ended calendar month of less than $100,000 on an individual basis and $500,000 in the aggregate for all such Excluded Accounts excluded pursuant to this clause (b).
“Newco”: a wholly-owned subsidiary of Ergon formed to, among other things, facilitate the Ergon Transactions.

6

“Second Amendment”: that certain Second Amendment to Amended and Restated Credit Agreement dated as of July 15, 2016, entered into by and among the Borrower, the Administrative Agent and the Lenders party thereto. 
“Second Amendment Effective Date”: as defined in the Second Amendment.
“Write-Down and Conversion Powers”: with respect to any EEA Resolution Authority, the write-down and conversion powers of such EEA Resolution Authority from time to time under the Bail-In Legislation for the applicable EEA Member Country, which write-down and conversion powers are described in the EU Bail-In Legislation Schedule.
1.3.    Deleted Definitions.  Section 1.1 of the Credit Agreement is hereby amended to delete the definitions of “Knight Warrior Pipeline Initiation Certificate” and “Knight Warrior Pipeline Leverage Election Certificate” in their entirety.
1.4.    Amendment to Section 2.6.  Section 2.6 of the Credit Agreement is hereby amended and restated in full to read in its entirety as follows:
“Section 2.6    Mandatory Prepayments.  
(a)    If on any date any Group Member shall receive Net Cash Proceeds from any Asset Sale or Recovery Event then, unless a Reinvestment Notice shall be delivered in respect thereof, such Net Cash Proceeds shall be applied on such date toward prepayment of the Loans; provided, that, notwithstanding the foregoing, on each Reinvestment Prepayment Date, an amount equal to the Reinvestment Prepayment Amount with respect to the relevant Reinvestment Event shall be applied toward prepayment of the Loans; and 
(b)    If, (i) as of the end of any Business Day and for the three immediately preceding Business Days, the Consolidated Cash Balance exceeds $20,000,000 (the amount of such excess being referred to as the “Excess Cash Amount”), and (ii) the Borrower’s Consolidated Total Leverage Ratio for the most recently ended fiscal quarter preceding such date is greater than 4.75 to 1.00, then, on the next succeeding Business Day, the Borrower shall prepay the Loans in an amount equal to the lesser of (x) such Excess Cash Amount and (y) the aggregate principal amount of all Loans outstanding at such time.  Such prepayment will not result in the reduction of the Aggregate Commitments.”
1.5.    Amendment to Section 5.2.  Section 5.2 of the Credit Agreement is hereby amended as follows:
(a)    by inserting the following new clause (f) thereto immediately after clause (e) thereof, which new clause (f) shall read in its entirety as follows:
“(f)  At the time of and immediately after giving effect to such Credit Extension (after giving pro forma effect to any checks that will be issued, wire transfers or ACH transfers that will be initiated within three Business Days), the Consolidated Cash Balance shall not exceed an amount equal to $20,000,000.”

7

(b)    by amending and restating the final paragraph thereof to read in full as follows:
“Each of the delivery of a Borrowing Request or an LC Request and the acceptance by the Borrower of the proceeds of such Credit Extension shall constitute a representation and warranty by the Borrower and each other Loan Party that on the date of such Credit Extension (both immediately before and after giving pro forma effect to any checks that will be issued, wire transfers or ACH transfers that will be initiated within three Business Days after such Credit Extension) the conditions contained in Sections 5.2(b)-5.2(f) have been satisfied.  Borrower shall provide such information (including calculations in reasonable detail of the covenants in Section 7.1) as the Administrative Agent may reasonably request to confirm that the conditions in Sections 5.2(b)-5.2(f) have been satisfied.”
1.6.    Amendment to Article 6.  Article 6 of the Credit Agreement is hereby amended by inserting the following new Section 6.13 at the end of such Section to read in its entirety as follows:
“Section 6.13    Accounts.  Each Loan Party shall:
(a) from and after the 30th day following the Second Amendment Effective Date (or such later date as may be extended by the Administrative Agent in its sole discretion from time to time), cause all of its deposit accounts, securities accounts and commodity accounts, other than Excluded Accounts, to be subject to Account Control Agreements; and 
(b) upon the request of the Administrative Agent, promptly provide a schedule of the deposit accounts, securities accounts and commodity accounts of the Loan Parties together with such other information in respect of such accounts as the Administrative Agent may reasonably request.”
1.7.    Amendment to Section 7.1.  Section 7.1(a) of the Credit Agreement is hereby amended and restated in full to read in its entirety as follows:
(a)    Consolidated Total Leverage Ratio.  
(i)    For all periods ending prior to the Qualified Senior Notes Date, permit the Consolidated Total Leverage Ratio as at the last day of any fiscal quarter to exceed the ratio set forth below opposite such fiscal quarter:
	
		
	Each Fiscal Quarter Ending on the Following Dates
	Consolidated Total Leverage Ratio

	June 30, 2016
	5.00 to 1.00

	September 30, 2016
	5.00 to 1.00

	December 31, 2016 and each fiscal quarter ending thereafter
	4.75 to 1.00

8

provided, that from and after the last day of the fiscal quarter immediately preceding the fiscal quarter in which a Specified Acquisition occurs to and including the last day of the second full fiscal quarter following the fiscal quarter in which such Specified Acquisition occurred, the Consolidated Total Leverage Ratio shall not exceed 5.25 to 1.00, regardless of the amounts set forth above; and
(ii)    For all periods ending on or after the Qualified Senior Notes Date, the Borrower shall not permit the Consolidated Total Leverage Ratio as at the last day of any fiscal quarter to exceed 5.00 to 1.00, provided, that from and after the last day of the fiscal quarter immediately preceding the fiscal quarter in which a Specified Acquisition occurs to and including the last day of the second full fiscal quarter following the fiscal quarter in which such Specified Acquisition occurred, the Consolidated Total Leverage Ratio shall not exceed 5.50 to 1.00.
1.8.    Amendment to Section 7.6.  Section 7.6 of the Credit Agreement is hereby amended by deleting the “and” at the end of clause (d) thereof, replacing the “.” at the end of clause (e) thereof and replacing it with “; and” and inserting the following new clause (f) at the end of such Section in full as follows:
“(f)    solely in connection with the Ergon Transactions and on the Ergon Transaction Effective Date, the Borrower may repurchase approximately 13,335,390 of its Series A Preferred Units owned by Vitol and Charlesbank (and their respective Affiliates) as of such date; provided that concurrently with such repurchase (i) the Borrower shall issue approximately 18,312,968 new Series A Preferred Units to Newco or an affiliate of Ergon, which shall be subject to substantially the same terms as the Series A Preferred Units currently owned by Vitol and Charlesbank (and their respective Affiliates) immediately prior to such repurchase, (ii) Newco or an affiliate of Ergon shall contribute to the Borrower 100% of the Capital Stock of the Subsidiary of Ergon that owns the Ergon Terminals and cash expected to be $16,000,000 (but in any event no less than $10,000,000) and (iii) for the avoidance of doubt, the Borrower hereby acknowledges and agrees that the new Series A Preferred Units issued in connection with the Ergon Transactions to Newco or an affiliate of Ergon shall be subject to all of the covenants in this Agreement, including, but not limited to, Sections 7.6 and 7.8 of this Agreement.”
1.9.    Amendment to Section 7.9.  Section 7.9 of the Credit Agreement is hereby amended by amending and restating the proviso at the end of such Section in full as follows:
“provided that the foregoing restriction shall not apply to (i) Restricted Payments permitted by Section 7.6, (ii) any transactions listed on Schedule 7.9, (iii) any transactions approved by the Conflicts Committee or (iv) any transaction with Ergon or its Subsidiaries entered into prior to the Ergon Transaction Effective Date.”

9

1.10.    Amendment to Article 7.  Article 7 of the Credit Agreement is hereby amended by inserting the following new Section 7.21 at the end of such Article:
“Section 7.21    Ergon Transaction Agreements.  Amend or modify the terms of the Ergon Contribution Agreement from the draft thereof delivered to the Lenders pursuant to the Second Amendment in any manner, taken as a whole, that would be materially adverse to the interests of the Lenders, provided, that for purposes hereof, any amendment or modification to the terms of the Ergon Contribution Agreement that would result in a material decrease in the consideration received by the Loan Parties (including the Ergon Terminals and cash consideration) as contemplated by the draft form of the Ergon Contribution Agreement delivered to the Lenders pursuant to the Second Amendment shall be deemed to be materially adverse to the Lenders, unless approved by the Required Lenders.
1.11.    Amendment to Article 10.  Article 10 of the Credit Agreement is hereby amended by inserting the following new Section 10.22 at the end of such Article:
“Section 10.22. Acknowledgement and Consent to Bail-In of EEA Financial Institutions. Notwithstanding anything to the contrary in any Loan Document or in any other agreement, arrangement or understanding among any such parties, each party hereto acknowledges that any liability of any EEA Financial Institution arising under any Loan Document, to the extent such liability is unsecured, may be subject to the Write-Down and Conversion Powers of an EEA Resolution Authority and agrees and consents to, and acknowledges and agrees to be bound by:
(a) the application of any Write-Down and Conversion Powers by an EEA Resolution Authority to any such liabilities arising hereunder which may be payable to it by any party hereto that is an EEA Financial Institution; and
(b) the effects of any Bail-in Action on any such liability, including, if applicable:
(i) a reduction in full or in part or cancellation of any such liability;
(ii) a conversion of all, or a portion of, such liability into shares or other instruments of ownership in such EEA Financial Institution, its parent undertaking, or a bridge institution that may be issued to it or otherwise conferred on it, and that such shares or other instruments of ownership will be accepted by it in lieu of any rights with respect to any such liability under this Agreement or any other Loan Document; or
(iii) the variation of the terms of such liability in connection with the exercise of the write-down and conversion powers of any EEA Resolution Authority.”
SECTION 2.    Conditions Precedent.  The effectiveness of the amendments to the Credit Agreement set forth in Section 1 hereof is subject to satisfaction of the following (the date on which such conditions are fulfilled is referred to as the “Second Amendment Effective Date”):

10

2.1.    No Material Adverse Change.  Since December 31, 2015, there shall have been no Material Adverse Effect.
2.2.    No Default.  No Default or Event of Default shall have occurred which is continuing.
2.3.    Amendment Fee.  Borrower shall have paid to the Administrative Agent, for the account of each of the Lenders that execute and deliver this Second Amendment on or prior to the Second Amendment Effective Date, amendment fees for each such Lender in an amount equal to 10 basis points (0.10%) of such Lender’s Commitment.
2.4.    Fees and Expenses.  Borrower shall have paid all other reasonable fees and expenses incurred by Administrative Agent (including, without limitation, reasonable fees and expenses of counsel to Administrative Agent) in the preparation, execution, review and negotiation of this Second Amendment and the other Loan Documents to the extent Borrower receives an invoice therefor at least two Business Days prior to the Second Amendment Effective Date.
2.5.    Ergon Transaction Agreements.  Administrative Agent shall have received a true and correct copy of the most recent draft of the Ergon Contribution Agreement and Preferred Unit Repurchase Agreement, including all exhibits, annexes and schedules thereto available at such time, which will be in form and substance reasonably satisfactory to the Administrative Agent.
SECTION 3.    Representations and Warranties of Borrower.  To induce the Lenders party hereto and Administrative Agent to enter into this Second Amendment, Borrower hereby represents and warrants to such Lenders and Administrative Agent as follows:
3.1.    Reaffirm Existing Representations and Warranties.  Each representation and warranty of Borrower and its Subsidiaries contained in the Credit Agreement and the other Loan Documents is true and correct in all material respects on the date hereof and will be true and correct in all material respects immediately after giving effect to the amendments set forth in Section 1 hereof (other than representations and warranties that were made as of a specific date, in which case such representations and warranties were true and correct in all material respects when made), except that to the extent that any such representation and warranty is already qualified by materiality, such representation and warranty shall be true and correct in all respects.
3.2.    Due Authorization; No Conflict.  The execution, delivery and performance of this Second Amendment are within Borrower's limited partnership powers, have been duly authorized by all necessary organizational or corporate action, require no action by or in respect of, or filing with, any governmental body, agency or official and do not violate or constitute a default under any provision of applicable law or any material agreement binding upon Borrower or result in the creation or imposition of any Lien upon any of the assets of Borrower.
3.3.    Validity and Enforceability.  This Second Amendment constitutes the valid and binding obligation of Borrower enforceable in accordance with its terms, except as (a) the enforceability thereof may be limited by bankruptcy, insolvency, reorganization, moratorium or similar laws affecting creditor's rights generally, and (b) the availability of equitable remedies may be limited by equitable principles of general application, regardless of whether considered in a proceeding in equity or at law.

11

3.4.    No Default or Event of Default.  No Default or Event of Default has occurred which is continuing.
3.5.    No Defense.  Borrower acknowledges that Borrower has no defenses to (a) Borrower’s obligation to pay the Obligations when due, or (b) the validity, enforceability or binding effect against Borrower and each Loan Party, as applicable, of the Credit Agreement or any of the other Loan Documents or any Liens intended to be created thereby.
SECTION 4.    Miscellaneous.
4.1.    No Waivers.  No failure or delay on the part of Administrative Agent or Lenders to exercise any right or remedy under the Credit Agreement, any other Loan Documents or applicable law shall operate as a waiver thereof, nor shall any single or partial exercise of any right or remedy preclude any other or further exercise of any right or remedy, all of which are cumulative and may be exercised without notice except to the extent notice is expressly required (and has not been waived) under the Credit Agreement, the other Loan Documents and applicable law.
4.2.    Reaffirmation of Loan Documents.  Any and all of the terms and provisions of the Credit Agreement and the Loan Documents shall, except as amended and modified hereby, remain in full force and effect.  The amendments contemplated hereby shall not limit or impair any Liens securing the Obligations (subject to Liens permitted by Section 7.3 of the Credit Agreement), and such Liens are hereby ratified, affirmed and extended to secure and guarantee the Obligations as they may be modified pursuant hereto.
4.3.    Parties in Interest.  All of the terms and provisions of this Second Amendment shall bind and inure to the benefit of the parties hereto and their respective successors and assigns.
4.4.    Counterparts.  This Second Amendment may be executed in counterparts, and all parties need not execute the same counterpart; however, no party shall be bound by this Second Amendment until Borrower, Administrative Agent and the Required Lenders have executed a counterpart.  Facsimiles or other electronic transmission (e.g., .pdf) shall be effective as originals.
4.5.    Complete Agreement.  THIS SECOND AMENDMENT, THE CREDIT AGREEMENT AND THE OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT AMONG THE PARTIES HERETO AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR OR CONTEMPORANEOUS ORAL AGREEMENTS OF THE PARTIES.  THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN OR AMONG THE PARTIES.

12

4.6.    Headings.  The headings, captions and arrangements used in this Second Amendment are, unless specified otherwise, for convenience only and shall not be deemed to limit, amplify or modify the terms of this Second Amendment, nor affect the meaning thereof.
4.7.    Effectiveness.  This Second Amendment shall be effective automatically and without necessity of any further action by Borrower, Administrative Agent or Lenders when counterparts hereof have been executed by Borrower, Administrative Agent and the Required Lenders, and all conditions to the effectiveness hereof set forth herein have been satisfied.
4.8.    Governing Law.  THIS SECOND AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES UNDER THIS SECOND AMENDMENT AND ANY CLAIM OR CONTROVERSY ARISING OUT OF OR RELATED TO THIS SECOND AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAW OF THE STATE OF NEW YORK.
[Signature pages to follow]

13

IN WITNESS WHEREOF, the parties hereto have caused this Second Amendment to be duly executed by their respective authorized officers as of the date and year first above written.

	
			
	BORROWER:

	 
	 
	 

	 
	 
	 

	BLUEKNIGHT ENERGY PARTNERS, L.P.

	 
	 
	 

	By:
	Blueknight Energy Partners G.P., L.L.C., its

	 
	general partner

	 
	 
	 

	 
	By:
	/s/ Alex G. Stallings

	 
	Name:
	Alex G. Stallings

	 
	Title:
	Chief Financial Officer

	
			
	ADMINISTRATIVE AGENT/LENDER:

	 
	 
	 

	 
	WELLS FARGO BANK, NATIONAL 

	 
	ASSOCIATION, as Administrative Agent, Issuing

	 
	Lender and as a Lender

	 
	 
	 

	 
	By:
	/s/ John Mammen

	 
	Name:
	John Mammen

	 
	Title:
	Vice President

	
			
	LLOYDS TSB BANK PLC, as Co-Syndication

	Agent and as a Lender

	 
	 
	 

	 
	By:
	/s/ Erin Walsh

	 
	Name:
	Erin Walsh

	 
	Title:
	Assistant Vice President - W004

	 
	 
	 

	 
	By:
	/s/ Daven Popat

	 
	Name:
	Daven Popat

	 
	Title:
	Senior Vice President - P003

	
			
	ROYAL BANK OF CANADA, as Co-Syndication

	Agent and as a Lender

	 
	 
	 

	 
	By:
	/s/ Caleb Allen

	 
	Name:
	Caleb Allen

	 
	Title:
	Authorized Signatory

	
			
	NATIXIS, a Co-Documentation Agent and as a

	Lender

	 
	 
	 

	 
	By:
	/s/ Timothy L. Polvado

	 
	Name:
	Timothy L. Polvado

	 
	Title:
	Senior Managing Director

	 
	 
	 

	 
	By:
	/s/ Leila Zomorrodian

	 
	Name:
	Leila Zomorrodian

	 
	Title:
	Director

	
			
	SUNTRUST BANK, as Co-Documentation Agent

	and a Lender

	 
	 
	 

	 
	By:
	/s/ Yann Pirio

	 
	Name:
	Yann Pirio

	 
	Title:
	Managing Director

	
			
	SOCIÉTÉ GÉNÉRALE, as a Lender

	 
	 
	 

	 
	By:
	/s/ Michiel V.M. van der Voort

	 
	Name:
	Michiel V.M. van der Voort

	 
	Title:
	Managing Director

	
			
	COMPASS BANK, as a Lender

	 
	 
	 

	 
	By:
	/s/ Mark H. Wolf

	 
	Name:
	Mark H. Wolf

	 
	Title:
	Senior Vice President

	
			
	COÖPERATIEVE CENTRALE RAIFFEISEN-

	BOERENLEENBANK B.A., "RABOBANK

	NEDERLAND", NEW YORK BRANCH, as a Lender

	 
	 
	 

	 
	By:
	/s/ Chan K. Park

	 
	Name:
	Chan K. Park

	 
	Title:
	Managing Director

	 
	 
	 

	 
	By:
	/s/ Haydn Scarr

	 
	Name:
	Haydn Scarr

	 
	Title:
	Executive Director

	
			
	CITIBANK, N.A., as a Lender

	 
	 
	 

	 
	By:
	/s/ Daniel Gouger

	 
	Name:
	Daniel Gouger

	 
	Title:
	Vice President

	
			
	MIZUHO CORPORATE BANK LTD., as a Lender

	 
	 
	 

	 
	By:
	/s/ Leon Mo

	 
	Name:
	Leon Mo

	 
	Title:
	Authorized Signatory

	
			
	ZB, N.A., dba Amegy Bank, as a Lender

	 
	 
	 

	 
	By:
	/s/ Larry L. Sears

	 
	Name:
	Larry L. Sears

	 
	Title:
	Senior Vice President - Amergy Bank Division V

	
			
	CADENCE BANK, as a Lender

	 
	 
	 

	 
	By:
	/s/ David Anderson

	 
	Name:
	David Anderson

	 
	Title:
	Senior Vice PresidentExhibit

EXECUTION VERSION

STOCK REPURCHASE AGREEMENT
THIS STOCK REPURCHASE AGREEMENT (this “Agreement”) is entered into as of July 18, 2016 by and among NCI Building Systems, Inc., a Delaware corporation (the “Company”), and the stockholders of the Company listed on Schedule A to this Agreement (collectively, the “Investors”).
Background
A.    The Investors own an aggregate of 43,211,817 shares of the Company’s common stock, $0.01 par value per share (“Common Stock”), and have agreed to transfer a portion of those shares to the Company on the terms and conditions set forth in this Agreement; 

B.    The Investors and the Company are commencing, on the date hereof, an underwritten public offering (the “Public Offering”) of certain shares of Common Stock held by the Investors (the “Underwritten Shares”); and

C.    The Company has proposed to repurchase a number of shares of Common Stock (the “Repurchase Shares”) at the price per share to the underwriter in the Public Offering (the “Purchase Price”) equal to an aggregate purchase price of $45,000,000 (rounded down to the nearest whole share) upon the terms and conditions provided in this Agreement (the “Repurchase”).  

D.      The Investors and the Company desire to condition the Repurchase on the closing of the Public Offering.

THEREFORE, in consideration of the mutual covenants herein and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the undersigned hereby agree as follows:

Agreement

1.Repurchase.    
(a)    Each Investor hereby agrees, severally and not jointly, to transfer, assign, sell, and convey 100% of its right, title, and interest in and to the number of Repurchase Shares equal to the aggregate dollar amount set forth opposite such Investor’s name on Schedule A divided by the Purchase Price (rounded down to the nearest whole share).
(b)    The obligations of the Company to purchase the Repurchase Shares shall be subject to the closing of the Public Offering pursuant to an underwriting agreement by and among the Company, the Investors and the underwriter named therein (the “Underwriting Agreement”).
(c)    The closing of the sale of the Repurchase Shares (the “Closing”), as applicable, shall take place upon the same day as the closing of the sale of the Underwritten Shares at the offices of Debevoise & Plimpton LLP, 919 Third Avenue, New York, NY  10022, or at such other time and place as may be agreed upon by the Company and Investors holding a majority of the aggregate number of Repurchase Shares.  At the Closing, each Investor shall deliver to the Company or as instructed by the Company duly executed stock powers relating to those Repurchase Shares being sold by such Investor, and the Company agrees to deliver to each Investor by wire transfer in accordance with written instructions to be provided by the Investors prior to the Closing of immediately available funds the Purchase Price multiplied by the number of Repurchase 

Shares being sold by such Investor.  
(d)    The Investors each agree to pay all stamp, stock transfer and similar duties, if any, in connection with the Repurchase.
(e)    The Company shall be entitled to deduct and withhold from payments of the Purchase Price any amount required to be so deducted or withheld pursuant to the Internal Revenue Code of 1986, as amended, and the applicable Treasury regulations thereunder.
2.Company Representations. In connection with the transactions contemplated hereby, the Company represents and warrants to the Investors that:
(a)The Company is a corporation duly organized and existing under the laws of the State of Delaware. 
(b)The Company has the requisite corporate power and authority to execute, deliver and perform its obligations under this Agreement and to consummate the transactions contemplated hereby; and this Agreement has been duly authorized, executed and delivered by the Company;    
(c)This Agreement constitutes a valid and binding agreement of the Company enforceable in accordance with its terms, except to the extent that enforcement thereof may be limited by bankruptcy, insolvency, reorganization or other laws affecting enforcement of creditors’ rights or by general equitable principles.
(d)The compliance by the Company with this Agreement and the consummation of the transactions herein contemplated will not (i) conflict with or result in a breach or violation of any of the terms or provisions of, or constitute a default under any indenture, mortgage, deed of trust, loan agreement or other agreement or instrument to which the Company or any of the subsidiaries of the Company listed on Schedule B (such subsidiaries, the “Designated Subsidiaries”) is a party or by which the Company or any of the Designated Subsidiaries is bound or to which any of the property or assets of the Company or any of the Designated Subsidiaries is subject, (ii) violate any provision of the certificate of incorporation or by-laws, as applicable, of the Company or the Designated Subsidiaries or (iii) violate any statute or any order, rule or regulation of any court or governmental agency or body having jurisdiction over the Company or any of the Designated Subsidiaries or any of their properties; except, in the case of clauses (i) and (iii), as would not reasonably be expected to have a material adverse effect on the financial position, stockholders’ equity or results of operations of the Company and its subsidiaries, taken as a whole (a “Material Adverse Effect”), in the case of each such clause, after giving effect to any consents, approvals, authorizations, orders, registrations, qualifications, waivers and amendments as will have been obtained or made as of the date of this Agreement; and no consent, approval, authorization, order, registration or qualification of or with any such court or governmental agency or body is required for the execution, delivery and performance by the Company of its obligations under this Agreement, including the consummation by the Company of the transactions contemplated by this Agreement, except where the failure to obtain or make any such consent, approval, authorization, order, registration or qualification would not reasonably be expected to have a Material Adverse Effect;
3.Representations of the Investors. In connection with the transactions contemplated hereby, each Investor severally and not jointly represents and warrants to the Company that:
(a)All consents, approvals, authorizations, orders or filings necessary for the execution and delivery by such Investor of this Agreement and for the sale and delivery of the Repurchase Shares to 

be sold by such Investor hereunder, have been obtained, or will be obtained prior to the delivery of the Repurchase Shares; and such Investor has full right, power and authority to enter into this Agreement and to sell, assign, transfer and deliver the Repurchase Shares to be sold by such Investor hereunder, except for such consents, approvals, authorizations and orders as would not impair in any material respect the consummation of the Investors’ obligations hereunder;
(b)This Agreement constitutes a valid and binding agreement of such Investor, enforceable in accordance with its terms, except to the extent that enforcement thereof may be limited by bankruptcy, insolvency, reorganization or other laws affecting enforcement of creditors’ rights or by general equitable principles.
(c)The sale of the Repurchase Shares to be sold by such Investor hereunder and the compliance by such Investor with all of the provisions of this Agreement and the consummation of the transactions contemplated herein (i) will not conflict with or result in a breach or violation of any of the terms or provisions of, or constitute a default under, any statute, indenture, mortgage, deed of trust, loan agreement or other agreement or instrument to which such Investor is a party or by which such Investor is bound or to which any of the property or assets of such Investor is subject, (ii) nor will such action result in any violation of the provisions of (a) any organizational or similar documents pursuant to which such Investor was formed or (b) any statute or any order, rule or regulation of any court or governmental agency or body having jurisdiction over such Investor or the property of such Investor; except in the case of clause (i) or clause (ii)(b), for such conflicts, breaches, violations or defaults as would not impair in any material respect the consummation of such Investor’s obligations hereunder.
(d)As of the date hereof and immediately prior to the delivery of the Repurchase Shares to the Company at the Closing, such Investor will be the beneficial or record holder of the Repurchase Shares with full dispositive power thereover, and holds, and will hold, such Repurchase Shares free and clear of all liens, encumbrances, equities or claims; and, upon delivery of such Repurchase Shares and payment therefor pursuant hereto, assuming that the Company has no notice of any adverse claims within the meaning of Section 8-105 of the New York Uniform Commercial Code as in effect in the State of New York from time to time (the “UCC”), the Company will acquire a valid security entitlement (within the meaning of Section 8-102(a)(17) of the UCC) to such Repurchase Shares purchased by the Company, and no action (whether framed in conversion, replevin, constructive trust, equitable lien or other theory) based on an adverse claim (within the meaning of Section 8-105 of the UCC) to such security entitlement may be asserted against the Company.
(e)The Investors have received all of the information that they consider necessary or appropriate for deciding whether to sell the Repurchase Shares and have had the opportunity to ask questions and receive answers from the Company.
(f)The Investors have had the opportunity to discuss with their tax advisors the consequences of the Repurchase.
4.Termination.    
(a)This Agreement may be terminated with respect to any Investor at any time by the mutual written, consent of the Company and such Investor.  Furthermore, this Agreement shall automatically terminate and be of no further force and effect, in the event that, the condition in paragraph 1(b) of this Agreement has not been satisfied within 15 business days after the date hereof. 
(b)In the event that this Agreement is terminated as to any Investor or any Investor defaults 

on the obligations of such Investor under paragraph 1 (a “Defaulting Investor”), the number of Repurchase Shares being sold to the Company by each remaining Investor shall remain equal to the number of Repurchase Shares equal to the aggregate dollar amount set forth opposite the name of such remaining Investor on Schedule A divided by the Purchase Price (rounded down to the nearest whole share).  
5.Notices. All notices, demands or other communications to be given or delivered under or by reason of the provisions of this Agreement will be in writing and will be deemed to have been given when delivered personally, mailed by certified or registered mail, return receipt requested and postage prepaid, or sent via a nationally recognized overnight courier, or sent via email (receipt of which is confirmed) to the recipient.  Such notices, demands and other communications will be sent, in the case of the Investors, to the addresses set forth on the signature pages to this Agreement and, in the case of the Company, to the address indicated below:
To the Company:

NCI Building Systems, Inc. 
10943 North Sam Houston Parkway West
Houston, Texas  77064
Attention:  Todd R. Moore 
Email Address: trmoore@ncigroup.com 
With a copy to (which shall not constitute notice):

Debevoise & Plimpton LLP 
919 Third Avenue 
New York, NY  10022
Attention:  Steven J. Slutzky 
Email Address:  sjslutzky@debevoise.com    

or such other address or to the attention of such other person as the recipient party shall have specified by prior written notice to the sending party.
6.Miscellaneous.

(a)Survival of Representations and Warranties. All representations and warranties contained herein or made in writing by any party in connection herewith shall survive the execution and delivery of this Agreement and the consummation of the transactions contemplated hereby.

(b)Severability.    Whenever possible, each provision of this Agreement will be interpreted in such manner as to be effective and valid under applicable law, but if any provision of this Agreement is held to be invalid, illegal, or unenforceable in any respect under any applicable law or rule in any jurisdiction, such invalidity, illegality, or unenforceability will not affect any other provision or any other jurisdiction, but this Agreement will be reformed, construed, and enforced in such jurisdiction as if such invalid, illegal, or unenforceable provision had never been contained herein.

(c)Complete Agreement.  This Agreement and any other agreements ancillary thereto and executed and delivered on the date hereof embody the complete agreement and understanding between the parties and supersede and preempt any prior understandings, agreements, or representations by or among the parties, written or oral, which may have related to the subject matter hereof in any way.

(d)Counterparts.    This Agreement may be executed in separate counterparts, each of which is deemed to be an original and all of which taken together constitute one and the same agreement.

(e)Successors and Assigns.  Except as otherwise provided herein, this Agreement shall bind and inure to the benefit of and be enforceable by the Investors and the Company and their respective successors and assigns.

(f)Governing Law. The Agreement will be governed by and construed in accordance with the laws of the State of New York.

(g)Remedies.  The parties hereto agree and acknowledge that money damages may not be an adequate remedy for any breach of the provisions of this Agreement and that any party may in its sole discretion apply to any court of law or equity of competent jurisdiction (without posting any bond or deposit) for specific performance or other injunctive relief in order to enforce, or prevent any violations of, the provisions of this Agreement.

(h)Amendment and Waiver. The provisions of this Agreement may be amended and waived only with the prior written consent of the Company and each Investor.

(i)Further Assurances.  Each of the Company and the Investors shall execute and deliver such additional documents and instruments and shall take such further action as may be necessary or appropriate to effectuate fully the provisions of this Agreement.

(j)Expenses.  Each of the Company and the Investors shall bear their own expenses in connection with the drafting, negotiation, execution and delivery of this Agreement and the consummation of the transactions contemplated hereby.

(k)Interpretation.  The definitions in this Agreement are applicable to the singular as well as the plural forms of such terms.

[Signatures appear on following pages.]

 
 

IN WITNESS WHEREOF, the parties hereto have executed this Stock Repurchase Agreement as of the date first written above.
 
 	
			
	Company:

	 
	 
	 

	NCI BUILDING SYSTEMS, INC.

	 
	 

	By:
	/s/ Mark E. Johnson

	 
	Name:
	Mark E. Johnson

	 
	Title:
	Executive Vice President, Chief Financial

	 
	 
	Officer & Treasurer

	
			
	Investors:

	 
	 
	 

	CLAYTON, DUBILIER & RICE FUND VIII, L.P.

	By:
	CD&R Associates VIII, Ltd.,

	 
	its general partner

	 
	 
	 

	By:
	/s/ Theresa A. Gore

	 
	Name:
	Theresa A. Gore

	 
	Title:
	Vice President, Treasurer &

	 
	 
	Assistant Secretary

	 
	 
	 

	 
	 
	 

	 
	 
	 

	CD&R FRIENDS & FAMILY FUND VIII, L.P.

	By:
	CD&R Associates VIII, Ltd.,

	 
	its general partner

	 
	 
	 

	By:
	/s/ Theresa A. Gore

	 
	Name:
	Theresa A. Gore

	 
	Title:
	Vice President, Treasurer &

	 
	 
	Assistant Secretary

	 
	 
	 

	 
	 
	 

	Address for Notices:

	 
	 
	 

	Clayton, Dubilier & Rice Fund VIII, L.P.

	c/o Clayton, Dubilier & Rice, LLC

	375 Park Avenue

	New York, New York 10152

	Attention: Theresa A. Gore

	 
	 
	 

	with a copy (which shall not constitute notice) to:

	 
	 
	 

	Debevoise & Plimpton LLP

	919 Third Avenue

	New York, New York 10022

	Attention:  Andrew L. Bab, Esq.

	 
	 
	 

	 
	 
	 

 

 
 
[Signature Page to Stock Repurchase Agreement]

SCHEDULE A
 
	
					
	Investor
	 
	Repurchase Amount

	Clayton, Dubilier & Rice Fund VIII, L.P.
	 
	$
	44,887,628
	

	CD&R Friends & Family Fund VIII, L.P.
	 
	$
	112,372
	

	Total
	 
	$
	45,000,000
	

SCHEDULE B
 
NCI Group, Inc.

Robertson-Ceco II Corporation

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00260-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00260-of-00352.parquet"}]]