Notes Payable | 7. Notes Payable On March 31, 2016, the Company entered into a loan and security agreement (the “Loan Agreement”) with Western Alliance Bank (“Western Bank”) and Solar Capital Ltd. (“Solar Capital,” and collectively with Western Bank, the “Lenders”) and Western Alliance, as Collateral Agent (the “Collateral Agent”). Pursuant to the terms of the Loan Agreement, the Lenders provided the Company with a loan in the principal amount of $15,000,000, for working capital, to fund its general business requirements and to repay indebtedness of the Company to Oxford Finance LLC, Silicon Valley Bank and Horizon Technology Finance Corporation (collectively, the “Existing Lenders”) pursuant to the Loan and Security Agreement, dated as of October 18, 2011, entered into by and among the Existing Lenders and the Company (the “Oxford Loan Agreement”). On March 31, 2016, the Company used $7.2 million of the loan proceeds to repay the outstanding principal of $6.0 million, a final payment fee of $1.2 million and accrued interest of $45,000 under the Oxford Loan Agreement. The Company paid the Lenders a $0.1 million facility fee and $0.1 million in legal fees. On June 30, 2017, the Company entered into an amendment to the existing Loan Agreement (the “Amended Loan Agreement”). Under terms of the Amended Loan Agreement, the Company will be required to pay interest on the borrowings under the Loan Agreement at a per annum rate equal to 8.54% plus the then effective one-month U.S. LIBOR rate. The Amendment modified the loan repayment terms to be interest-only through July 1, 2018, followed by twenty-two (22) equal monthly payments of principal and interest through the maturity date, contingent upon receipt of at least Fifteen Million Dollars ($15,000,000) in unrestricted cash proceeds received after June 1, 2017 from the issuance by the Company of new equity securities any time after June 1, 2017, but on or prior to December 31, 2017. Thereafter and until the scheduled maturity date of April 1, 2020, in addition to interest accrued during such period, the monthly payments will include an amount equal to the outstanding principal divided by 28 months, unless the interest only period is extended by a further six months, in which case the amortization period will be 22 months. In addition to principal and interest, a final payment equal to $312,500 will be due upon maturity or such earlier date specified in the Loan Agreement, of which $152,000 has been accrued and recorded in the other accrued liabilities line item in the accompanying condensed consolidated balance sheet as of March 31, 2018. If the Company repays all amounts owed under the Loan Agreement prior to the maturity date, the Company will pay a prepayment fee equal to 1.0 % of the amount prepaid if the prepayment occurs after June 30, 2017 but on or prior to March 31, 2018 and 0.5 % of the amount prepaid if the prepayment occurs thereafter. On October 31, 2017, the Company entered into a second amendment to the Amended Loan Agreement (the “Second Amendment”). The Second Amendment modified the loan repayment terms to add two additional extended interest-only periods beyond July 1, 2018. If under the terms of the Amended Loan Agreement, the interest-only period has been extended to July 1, 2018, the Company could further extend the interest-only period to October 1, 2018, contingent upon the receipt of at least Fifteen Million dollars ($15,000,000) in unrestricted net cash proceeds from the issuance by the Company of new equity securities or as a non-refundable upfront payment on a new business development agreement or royalty financing agreement (the “New Capital”), on or after October 24, 2017, but on or prior to December 31, 2017. The Company qualified for the first additional extended interest-only period and extended the interest-only period to October 1, 2018. Subsequently, the Company may further extend the interest-only period to January 1, 2019, contingent upon the receipt of at least Twenty-Five Million dollars ($25,000,000) in New Capital (inclusive of any prior amounts received after October 24, 2017), on or after October 24, 2017, but on or prior to September 15, 2018. In conjunction with the Loan Agreement, the Lenders were issued five-year warrants to purchase an aggregate of up to 208,002 shares of the Company’s common stock at a per share exercise price of $3.2454. The fair value of the warrants issued was estimated to be $0.5 million using a Black-Scholes valuation model with the following assumptions: common stock price at issuance of $3.24; exercise price of $3.2454; risk-free interest rate of 1.21% based upon observed risk-free interest rates; expected volatility of 111.96% based on the Company’s average historical volatility; expected term of five years, which is the contractual life of the warrants; and a dividend yield of 0%. The fair value was recorded as a debt discount within notes payable and an increase to additional paid-in capital on the Company’s balance sheet. The debt discount is being amortized as interest expense over the term of the Loan Agreement, using the effective interest method . Pursuant to the Loan Agreement and the amendments, the Company is bound by a variety of affirmative covenants during the term of the Loan Agreement, including, without limitation, certain information delivery requirements, notice requirements and obligations to maintain certain insurance. Additionally, the Company is bound by certain negative covenants setting forth actions that are not permitted to be taken during the term of the Amended Loan Agreement without the Lenders’ consent, including, without limitation, incurring certain additional indebtedness, making certain asset dispositions, entering into certain mergers, acquisitions or other business combination transactions or incurring any non-permitted lien or other encumbrance on the Company’s assets. Upon the occurrence of an event of default under the Amended Loan Agreement (subject to cure periods for certain events of default), all amounts owed by the Company thereunder would begin to bear interest at a rate that is 5.0% higher than the rate that would otherwise be applicable and may be declared immediately due and payable by the Collateral Agent. Events of default under the Amended Loan Agreement include, among other things, the following: the occurrence of certain bankruptcy events; the failure to make payments under the Loan Agreement when due; the occurrence of a material impairment on the Collateral Agent’s security interest over the collateral, a material adverse change in the business, operations or condition (financial or otherwise) of the Company or material impairment of the prospect of repayment of the obligations under the Amended Loan Agreement; the occurrence of a default under certain other agreements entered into by the Company; the rendering of certain types of judgments against the Company; the revocation of certain government approvals of the Company; any breach by the Company of any covenant (subject to cure periods for certain covenants) made in the Amended Loan Agreement; and the failure of any representation or warranty made by the Company in connection with the Amended Loan Agreement to be correct in all material respects when made. The Amended Loan Agreement defines certain events of default, including instances of a Material Adverse Change in its operations, which may require prepayment of the outstanding loan. In the event of default by the Company under the Loan Agreement, the Lenders would be entitled to exercise their remedies thereunder, including the right to accelerate the debt, upon which the Company may be required to repay all amounts then outstanding under the Loan Agreement, which could harm the Company's financial condition. The Company was in compliance with all applicable covenants set forth in the Loan Agreement as of March 31, 2018 and December 31, 2017. . The Collateral Agent, for the benefit of the Lenders, has a perfected security interest in substantially all of the Company’s property, rights and assets, except for intellectual property, to secure the payment of all amounts owed to the Lenders under the Amended Loan Agreement Aggregate future minimum payments due under the Loan Agreement as of March 31, 2018 were as follows (in thousands): Year ending December 31, Total 2018 1,415 2019 5,456 2020 2,015 Total minimum payments 8,886 Less amount representing interest (1,386 ) Total notes payable as of March 31, 2018 7,500 Less unamortized debt discount and issuance costs (248 ) Less carrying amount of notes payable (7,252 ) Non-current portion of notes payable $ — |