Exhibit



Exhibit 10.4



AMENDMENT NO. 7 TO AMENDED AND RESTATED  
REVOLVING CREDIT AND SECURITY AGREEMENT
THIS AMENDMENT NO. 7 (this “Amendment”), dated as of June 10, 2016, to the Credit Agreement (as defined below) is entered into by and among the Lenders signatory hereto, PNC BANK, NATIONAL ASSOCIATION, in its capacity as agent for the Lenders (in such capacity, the “Agent”), EMERGE ENERGY SERVICES LP, a Delaware limited partnership (the “Parent Guarantor”), and each of the undersigned Borrowers.  Terms used herein without definition shall have the meanings ascribed to them in the Credit Agreement defined below.
RECITALS
A.    The Lenders, Agent, Parent Guarantor and Borrowers have previously entered into that certain Amended and Restated Revolving Credit and Security Agreement, dated as of June 27, 2014, as amended by Amendment No. 1, dated as of April 6, 2015, Amendment No. 2, dated as of November 20, 2015, Amendment No. 3, dated as of March 1, 2016, Amendment No. 4, dated as of May 20, 2016, Amendment No. 5, dated as of May 20, 2016 and Amendment No. 6, dated as of May 27, 2016 (as further amended, modified and supplemented from time to time, the “Credit Agreement”), pursuant to which the Lenders have made certain loans and financial accommodations available to Borrowers.
B.    The Required Lenders, Agent, Parent Guarantor and Borrowers, pursuant to Section 16.2(b) of the Credit Agreement, now wish to amend the Credit Agreement on the terms and conditions set forth herein.
AGREEMENT
NOW, THEREFORE, in consideration of the foregoing and the mutual covenants herein contained, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereby agree as follows:
1.Amendment.  Effective as of the Effective Date, paragraph (b) of Schedule 6.14 of the Credit Agreement is hereby replaced in its entirety with the following:
“(b)    Enter into definitive documentation for the Fuels Division Sale no later than June 15, 2016, which documentation shall provide for the purchase price to be (x) in such amount that would generate Net Cash Proceeds to the Borrowers of at least the Applicable Amount and (y) paid in cash at the time of consummation of the Fuels Division Sale;”.
2.
    Effectiveness of this Amendment.  The following conditions shall have been satisfied, as determined by Agent, before this Amendment is effective (the date of such effectiveness, the “Effective Date”):
(a)
    Agent shall have received this Amendment, fully executed by each Credit Party, Agent and Lenders constituting the Required Lenders.
(b)
    Agent shall have received a closing certificate signed by an Authorized Officer of each Credit Party dated as of the Effective Date stating that each of the representations and warranties set forth in Section 3 of this Amendment are true and correct on such date.
(c)
    All fees and expenses of the Agent and its affiliates required to be paid or reimbursed at or prior to the Effective Date shall have been paid in full, and all fees and expenses of Cahill Gordon & Reindel LLP in connection with the Credit Agreement and this Amendment shall have been paid in full.
(d)
    All other documents and legal matters in connection with the transactions contemplated by this Amendment shall have been delivered or executed or recorded, as required by Agent.
3.
    Representations and Warranties.  Each Credit Party represents and warrants as follows:
(a)
    Authority.  Such Credit Party has the requisite corporate power and authority to execute and deliver this Amendment, and to perform its obligations hereunder and under the Other Documents (as amended or modified hereby) to which it is a party.  The execution, delivery and performance by such Credit Party of this Amendment have been duly approved by all necessary corporate action and no other corporate proceedings are necessary to consummate such transactions.
(b)
    Enforceability.  This Amendment has been duly executed and delivered by each Credit Party.  This Amendment and each Other Document (as amended or modified hereby) is the legal, valid and binding obligation of each Credit Party, enforceable against each Credit Party in accordance with its terms, and is in full force and effect.
(c)
    Due Execution.  The execution, delivery and performance of this Amendment are within the power of each Credit Party, have been duly authorized by all necessary corporate action, have received all necessary governmental approval, if any, and do not contravene any law or any contractual restrictions binding on any Credit Party.
(d)
    No Default.  No Event of Default or Default has occurred and is continuing.
(e)
    Other Representations and Warranties.  Each of the representations and warranties made by any Credit Party in or pursuant to the Credit Agreement and the Other Documents are true and correct in all material respects (or, if such representation and warranty is, by its terms, limited by materiality (including a Material Adverse Effect), then such representation and warranty are true in all respects) on and as of the date hereof as if made on and as of the date hereof (except to the extent any such representation or warranty specifically relates to a certain prior date).
4.
    Choice of Law.  This Amendment shall be governed by and construed in accordance with the laws of the State of New York applied to contracts to be performed wholly within the State of New York.
5.
    Counterparts; Electronic Signatures.  This Amendment may be executed in any number of and by different parties hereto on separate counterparts, all of which, when so executed, shall be deemed an original, but all such counterparts shall constitute one and the same agreement.  Any signature delivered by a party by facsimile or other similar method of electronic transmission shall be deemed to be an original signature hereto.
6.
    Reference to and Effect on the Other Documents.
(a)
    Upon and after the effectiveness of this Amendment, each reference in the Credit Agreement to “this Agreement,” “hereunder,” “hereof” or words of like import referring to the Credit Agreement, and each reference in the Other Documents to “the Credit Agreement,” “thereof” or words of like import referring to the Credit Agreement, shall mean and be a reference to the Credit Agreement as modified and amended hereby.
(b)
    Except as specifically amended above, the Credit Agreement and all Other Documents, are and shall continue to be in full force and effect and are hereby in all respects ratified and confirmed and shall constitute the legal, valid, binding and enforceable obligations of Borrowers to Agent and the Lenders.
(c)
    The execution, delivery and effectiveness of this Amendment shall not, except as expressly provided herein, operate as a waiver of any right, power or remedy of the Agent and/or the Lenders under any of the Other Documents, nor constitute a waiver of any provision of any of the Other Documents.
(d)
    To the extent that any terms and conditions in any of the Other Documents shall contradict or be in conflict with any terms or conditions of the Credit Agreement, after giving effect to this Amendment, such terms and conditions are hereby deemed modified or amended accordingly to reflect the terms and conditions of the Credit Agreement as modified or amended hereby.
7.
    Estoppel.  To induce Agent and the Lenders to enter into this Amendment and to continue to make advances to Borrowers under the Credit Agreement, each Credit Party hereby acknowledges and agrees that, as of the date hereof, there exists no right of offset, defense, counterclaim or objection in favor of the Borrowers as against Agent or any Lender with respect to the Obligations.
8.
    Integration.  This Amendment, together with the Credit Agreement and the Other Documents, incorporates all negotiations of the parties hereto with respect to the subject matter hereof and is the final expression and agreement of the parties hereto with respect to the subject matter hereof.
9.
    Severability.  If any part of this Amendment is contrary to, prohibited by, or deemed invalid under Applicable Laws or regulations, such provision shall be inapplicable and deemed omitted to the extent so contrary, prohibited or invalid, but the remainder hereof shall not be invalidated thereby and shall be given effect so far as possible.
10.
    Submission of Amendment.  The submission of this Amendment to the parties or their agents or attorneys for review or signature does not constitute a commitment by Agent or the Lenders to modify the Credit Agreement, and this Amendment shall have no binding force or effect until all of the conditions to the effectiveness of this Amendment have been satisfied as set forth herein.
11.
    Guarantors’ Acknowledgment.  With respect to the amendments to the Credit Agreement effected by this Amendment, each Guarantor hereby acknowledges and agrees to this Amendment and confirms and agrees that its Guaranty and each Security Document to which it is a party (as modified and supplemented in connection with this Amendment) is and shall continue to be, in full force and effect and is hereby ratified and confirmed in all respects except that, upon the effectiveness of, and on and after the date of this Amendment, each reference in such Guaranty and Security Document to the Credit Agreement, “thereunder,” “thereof” or words of like import referring to the Credit Agreement, shall mean and be a reference to the Credit Agreement as amended or modified by this Amendment.  Although Agent and the Lenders have informed the Guarantors of the matters set forth above, and each Guarantor has acknowledged the same, each Guarantor understands and agrees that neither Agent nor any Lender has any duty under the Credit Agreement, the Guaranty or any other agreement with any Guarantor to so notify any Guarantor or to seek such an acknowledgement, and nothing contained herein is intended to or shall create such a duty as to any transaction hereafter.  Each Credit Party hereby ratifies and reaffirms the validity, enforceability and perfection of the Liens and security interests granted to the Agent for the benefit of the Secured Parties to secure any of the Obligations (as defined in the Credit Agreement and including after giving effect to this Amendment) by each Credit Party pursuant to the Other Documents to which any Credit Party is a party and agrees that the Liens and security interests granted pursuant to the Other Documents shall continue to secure Obligations under the Credit Agreement as amended by this Amendment.
12.
    General Release; Indemnity.  
(a)
    In consideration of, among other things, Agent’s and the Lenders’ execution and delivery of this Amendment, each Borrower and each other Credit Party, on behalf of itself and its agents, representatives, officers, directors, advisors, employees, subsidiaries, affiliates, successors and assigns (collectively, “Releasors”), hereby forever agrees and covenants not to sue or prosecute against any Releasee (as hereinafter defined) and hereby forever waives, releases and discharges, to the fullest extent permitted by law, each Releasee from any and all claims (including, without limitation, crossclaims, counterclaims, rights of set-off and recoupment), actions, causes of action, suits, debts, accounts, interests, liens, promises, warranties, damages and consequential damages, demands, agreements, bonds, bills, specialties, covenants, controversies, variances, trespasses, judgments, executions, costs, expenses or claims whatsoever, that such Releasor now has or hereafter may have, of whatsoever nature and kind, whether known or unknown, whether now existing or hereafter arising, whether arising at law or in equity (collectively, the “Claims”), against any or all of the Secured Parties in any capacity and their respective affiliates, subsidiaries, shareholders and “controlling persons” (within the meaning of the federal securities laws), and their respective successors and assigns and each and all of the officers, directors, employees, agents, attorneys, advisors and other representatives of each of the foregoing (collectively, the “Releasees”), based in whole or in part on facts, whether or not now known, existing on or before the Effective Date, that relate to, arise out of or otherwise are in connection with: (i) any or all of the Credit Agreement or any Other Documents or transactions contemplated thereby or any actions or omissions in connection therewith, (ii) any aspect of the dealings or relationships between or among the Borrowers and the other Credit Parties, on the one hand, and any or all of the Secured Parties, on the other hand, relating to any or all of the documents, transactions, actions or omissions referenced in clause (i) hereof, or (iii) any aspect of the dealings or relationships between or among any or all of Insight Equity Management Company LLC and its affiliates, on the one hand, and the Lenders, on the other hand, but only to the extent such dealings or relationships relate to any or all of the documents, transactions, actions or omissions referenced in clause (i) hereof. The receipt by any Borrower or any other Credit Party of any Loans or other financial accommodations made by any Secured Party after the date hereof shall constitute a ratification, adoption, and confirmation by such party of the foregoing general release of all Claims against the Releasees that are based in whole or in part on facts, whether or not now known or unknown, existing on or prior to the date of receipt of any such Loans or other financial accommodations. In entering into this Agreement, each Borrower and each other Credit Party consulted with, and has been represented by, legal counsel and expressly disclaims any reliance on any representations, acts or omissions by any of the Releasees and hereby agrees and acknowledges that the validity and effectiveness of the releases set forth above do not depend in any way on any such representations, acts and/or omissions or the accuracy, completeness or validity thereof. The provisions of this Section 12 shall survive the termination of this Amendment, the Credit Agreement, the Other Documents and payment in full of the Obligations.
(b)
    Each Borrower and each other Credit Party hereby agrees that the Releasees shall each be an Indemnified Party and entitled to the benefits of Section 16.5 of the Credit Agreement, including, without limitation, with respect to any Claims arising from or in connection with the negotiation, preparation, execution, delivery, performance, administration and enforcement of this Amendment or any other document executed and/or delivered in connection therewith.
(c)
    Each Borrower and each other Credit Party, on behalf of itself and its successors, assigns, and other legal representatives, hereby absolutely, unconditionally and irrevocably, covenants and agrees with and in favor of each Releasee that it will not sue (at law, in equity, in any regulatory proceeding or otherwise) any Releasee, and will not assert in any proceeding any counterclaim or crossclaim against any Releasee, in each case on the basis of any Claim released, remised and discharged by any Borrower or any other Credit Party pursuant to Section 8(a) hereof. If any Borrower, any other Credit Party or any of its successors, assigns or other legal representatives violates the foregoing covenant, each Borrower and each other Credit Party, each for itself and its successors, assigns and legal representatives, agrees to pay, in addition to such other damages as any Releasee may sustain as a result of such violation, all attorneys' fees and costs incurred by any Releasee as a result of such violation.
[signature pages follow]



IN WITNESS WHEREOF, the parties have entered into this Amendment as of the date first above written.
	
		
	PARENT GUARANTOR:
	EMERGE ENERGY SERVICES LP
By:   EMERGE ENERGY SERVICES GP LLC, its General Partner
By:   /s/ Warren Bonham    
   Name: Warren Bonham 
   Title: Vice President

	BORROWERS:
	EMERGE ENERGY SERVICES OPERATING LLC
By:   /s/ Warren Bonham    
   Name: Warren Bonham 
   Title: Vice President

	 
	ALLIED ENERGY COMPANY LLC 
DIRECT FUELS LLC 
SUPERIOR SILICA SANDS LLC
By:   EMERGE ENERGY SERVICES OPERATING LLC, its sole member
By:   /s/ Warren Bonham    
   Name: Warren Bonham 
   Title: Vice President

	 
	ALLIED RENEWABLE ENERGY, LLC
By:   ALLIED ENERGY COMPANY LLC, its sole member
By:   EMERGE ENERGY SERVICES OPERATING LLC, its sole member
By:   /s/ Warren Bonham    
   Name: Warren Bonham 
   Title: Vice President







	
		
	 
	EMERGE ENERGY DISTRIBUTORS INC.
By:   /s/ Warren Bonham    
   Name: Warren Bonham 
   Title: Vice President








	
		
	AGENT AND LENDER:
	PNC BANK, NATIONAL ASSOCIATION
By:   /s/ Ron Eckhoff    
   Name: Ron Eckhoff 
   Title: Vice President








	
		
	A LENDER:
	WELLS FARGO BANK, N.A.
By:   /s/ Daniel M. Smith    
   Name: Daniel M. Smith 
   Title: Vice President



	A LENDER:
	BRANCH BANKING AND TRUST COMPANY
By:   /s/ David A. White    
   Name: David A. White 
   Title: Senior Vice President



	A LENDER:
	SANTANDER BANK, N.A.
By:   /s/ Aidan Lanigan    
   Name: Aidan Lanigan 
   Title: Senior Vice President
By:   /s/ Puiki Lok    
   Name: Puiki Lok 
   Title: Vice President



	A LENDER:
	ROYAL BANK OF CANADA
By:   /s/ H. Christopher DeCotiis, CFA    
   Name: H. Christopher DeCotiis, CFA 
   Title: Attorney-in-Fact







	A LENDER:
	ZB, N.A dba AMEGY BANK
By:   /s/ James C. Day    
   Name: James C. Day 
   Title: Senior Vice President



	A LENDER:
	MORGAN STANLEY BANK, N.A.
By:   /s/ Kevin Newman    
   Name: Kevin Newman 
   Title: Authorized Signatory



	A LENDER:
	STIFEL BANK & TRUST
By:   /s/ John H. Phillips    
   Name: John H. Phillips 
   Title: Executive Vice President



	A LENDER:
	MORGAN STANLEY SENIOR FUNDING, INC.
By:   /s/ Kevin Newman    
   Name: Kevin Newman 
   Title: Vice President