Debt
6 Months Ended
Jun. 30, 2015
Debt Disclosure [Abstract]  
Debt
Debt
On June 12, 2014, the Company terminated its loan and security agreement with its previous lender and entered into two debt arrangements with a new lender.
The first debt arrangement is the New Loan and Security Agreement. The New Loan and Security Agreement includes a revolving line of credit of potential maximum aggregate advances (the “New Revolving Line of Credit”) totaling $30.0 million. The amount available is: (a) the lesser of (i) the New Revolving Line of Credit or (ii) the amount available under the borrowing base (defined as 85% of eligible accounts receivable); minus (b) the outstanding principal balance of any advances. The New Revolving Line of Credit is secured by substantially all of the Company’s assets. The New Revolving Line of Credit has a maturity date of June 12, 2016. The interest rate on outstanding amounts under the New Revolving Line of Credit is a floating rate per annum equal to the prime referenced rate plus a potential applicable margin of 1.00%. Interest is payable monthly. In addition, the Company is required to maintain, at all times, $5.0 million, consisting of the sum of: (i) cash held at the lender (determined in accordance with the New Loan and Security Agreement); plus (ii) the unused availability amount; plus (iii) the undrawn portion of the term loan advance related to the Mezzanine Loan and Security Agreement, described below. As of June 30, 2015, the Company was in compliance with this requirement. 
The second debt arrangement is a term loan and security agreement (the Mezzanine Loan and Security Agreement). This Mezzanine Loan and Security Agreement includes a term loan with a total commitment of $15.0 million comprised of two separate tranches. The first tranche draw of $10.0 million occurred at closing and the second tranche of $5.0 million was drawn on December 16, 2014. The Mezzanine Loan and Security Agreement is secured by substantially all of the Company’s assets. The Mezzanine Loan and Security Agreement has a maturity date of June 12, 2017. The interest rate on outstanding amounts under the Mezzanine Loan and Security Agreement is fixed at 11.50%. Interest is payable monthly and the cumulative principal is due at maturity. The Company has the option to prepay all, but not less than all, of the principal balances of the Mezzanine Loan and Security Agreement at any time without a prepayment fee or penalty. As described in Note 2, under the Mezzanine Loan and Security Agreement, the Company had issued Lender Warrants to purchase 150,000 shares of common stock at a price of $11.36 per share as of December 31, 2014.
The proceeds from these new debt arrangements were used to pay off existing debt from a previous lender, in addition to providing additional working capital for general corporate purposes.
Under the terms of the New Loan and Security Agreement and the Mezzanine Loan and Security Agreement, the Company is required to meet and maintain certain customary financial and nonfinancial covenants, one of which restricts the Company’s ability to pay any dividends or make any distribution or payment to redeem, retire or purchase any capital stock, subject to certain specified exceptions. In addition, the Company must maintain with the lender all of its primary domestic operating and other deposit and investment accounts consisting of at least 95% of the Company’s total cash and cash equivalents balance. As of June 30, 2015, the Company was in compliance with all such covenants.
On February 12, 2015, the Company amended its New Loan and Security Agreement (the “Amended New Loan and Security Agreement”) and its Mezzanine Loan and Security Agreement (the Amended Mezzanine Loan and Security Agreement). The amended New Revolving Line of Credit (the “Amended New Revolving Line of Credit”) was increased by $5.0 million and allows for total potential maximum aggregate advances of $35.0 million. The amount of unused availability as of June 30, 2015 was $1.7 million. The effective interest rate for the Amended New Revolving Line of Credit was 3.25% as of June 30, 2015.  In addition, the Amended Mezzanine Loan and Security Agreement increased available borrowings by $5.0 million (the “2015 Term Loan”). An additional draw under the Amended Mezzanine Loan and Security Agreement occurred on February 12, 2015. There was no modification to the maturity dates or any other significant terms to either the Amended New Loan and Security Agreement or the Amended Mezzanine Loan and Security Agreement. As described in Note 2, as part of the Amended Mezzanine Loan and Security Agreement, the Company issued an additional warrant to the lender (Additional Lender Warrant) to purchase 50,000 shares of common stock at a price of $15.18 per share.
On March 20, 2015 and March 30, 2015, the Company repaid the first and second tranches of the Amended Mezzanine Loan and Security Agreement totaling $15.0 million. On April 1, 2015, the Company repaid the 2015 Term Loan of $5.0 million, which represented the remaining principal balance on the Amended Mezzanine Loan and Security Agreement.  Based on the repayment of these tranches, the Company reflected within the condensed consolidated statements of operations the write-off of the corresponding debt discount and deferred financing costs.
Debt consisted of the following as of December 31, 2014 and June 30, 2015 (in thousands):
 
2014
 
2015
Amended Mezzanine Loan and Security Agreement
$
15,000

 
$

Discount on Amended Mezzanine Loan and Security Agreement
(773
)
 

Amended New Revolving Line of Credit
29,900

 
26,550

Total debt
44,127

 
26,550

Less short-term debt

 
(26,550
)
Long-term debt, net
$
44,127

 
$