Summary of Significant Accounting Policies | SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES Principles of Consolidation The accompanying condensed consolidated financial statements include the accounts of the Company, its subsidiaries in which the Company has a controlling financial interest and four investment funds formed to fund the purchase and operation of solar energy systems, which are consolidated with the Company as variable interest entities (“VIE”). The Company uses a qualitative approach in assessing the consolidation requirement for VIEs. This approach focuses on determining whether the Company has the power to direct the activities of the VIE that most significantly affect the VIE’s economic performance and whether the Company has the obligation to absorb losses or the right to receive benefits that could potentially be significant to the VIE. For all periods presented, the Company has determined that it is the primary beneficiary in all but one of its operational VIEs. The Company evaluates its relationships with the VIEs on an ongoing basis to ensure that it continues to be the primary beneficiary. All significant intercompany accounts and transactions have been eliminated. Gains and losses from the translation of all foreign currency financial statements are recorded in accumulated other comprehensive loss, net, within stockholders’ equity. The Company prepares its condensed consolidated financial statements in conformity with GAAP. Use of Estimates GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities, the disclosure of contingent assets and liabilities at the date of the condensed consolidating financial statements and the reported amounts of revenue and expenses during the reporting period. The most significant estimates and assumptions used in these condensed consolidated financial statements relate to management’s estimates of final construction contract profit in accordance with accounting for long-term contracts, allowance for doubtful accounts, inventory reserves, realization of project development costs, fair value of derivative financial instruments, accounting for business acquisitions, stock-based awards, impairment of goodwill and long-lived assets, asset retirement obligations (“AROs”), leases, income taxes, self insurance reserves and potential liability in conjunction with certain commitments and contingencies. Actual results could differ from those estimates. The Company is self-insured for employee health insurance. The maximum exposure in fiscal year 2019 under the plan was $150 per covered participant, after which reinsurance takes effect. The liability for unpaid claims and associated expenses, including incurred but not reported claims, is determined by management and reflected in the Company’s condensed consolidated balance sheets in accrued expenses and other current liabilities. The liability is calculated based on historical data, which considers both the frequency and settlement amount of claims. The Company’s estimated accrual for this liability could be different than its ultimate obligation if variables such as the frequency or amount of future claims differ significantly from management’s assumptions. Cash and Cash Equivalents Cash and cash equivalents includes cash on deposit, overnight repurchase agreements and amounts invested in highly liquid money market funds. Cash equivalents consist of short term investments with original maturities of three months or less. The Company maintains accounts with financial institutions and the balances in such accounts, at times, exceed federally insured limits. This credit risk is divided among a number of financial institutions that management believes to be of high quality. The carrying amount of cash and cash equivalents approximates its fair value measured using level 1 inputs per the fair value hierarchy as defined in Note 10. Restricted Cash Restricted cash consists of cash and cash equivalents held in an escrow account in association with construction draws for energy savings performance contracts (“ESPC”), construction of energy assets, operations and maintenance (“O&M”) reserve accounts and cash collateralized letters of credit as well as cash required under term loans to be maintained in debt service reserve accounts until all obligations have been indefeasibly paid in full. These accounts are primarily invested in highly liquid money market funds. The carrying amount of the cash and cash equivalents in these accounts approximates its fair value measured using level 1 inputs per the fair value hierarchy as defined in Note 10. Restricted cash also includes funds held for clients, which represent assets that, based upon the Company’s intent, are restricted for use solely for the purposes of satisfying the obligations to remit funds to third parties, primarily utility service providers, relating to the Company’s enterprise energy management services. As of March 31, 2019 and December 31, 2018 , the Company classified the non-current portion of restricted cash of $20,920 and $19,637 , respectively, in other assets on its condensed consolidated balance sheets. Accounts Receivable Accounts receivable are stated at the amount management expects to collect from outstanding balances. An allowance for doubtful accounts is provided for those accounts receivable considered to be uncollectible based upon historical experience and management’s evaluation of outstanding accounts receivable. Bad debts are written off against the allowance when identified. Changes in the allowance for doubtful accounts are as follows: Three Months Ended March 31, 2019 2018 Allowance for doubtful accounts, beginning of period $ 2,765 $ 3,315 Charges to costs and expenses 77 64 Account write-offs and other (29 ) (86 ) Allowance for doubtful accounts, end of period $ 2,813 $ 3,293 Accounts Receivable Retainage Accounts receivable retainage represents amounts due from customers, but where payments are withheld contractually until certain construction milestones are met. Amounts retained typically range from 5% to 10% of the total invoice. The Company classifies as a current asset those retainages that are expected to be billed in the next twelve months. No amounts were determined to be uncollectible as of March 31, 2019 and December 31, 2018 . Inventory Inventories, which consist primarily of PV solar panels, batteries and related accessories, are stated at the lower of cost (“first-in, first-out” method) or net realizable value (determined as the estimated selling prices in the ordinary course of business, less reasonably predictable costs of completion, disposal, and transportation). Provisions have been made to reduce the carrying value of inventory to the net realizable value. Prepaid Expenses Prepaid expenses consist primarily of short-term prepaid expenditures that will amortize within one year. Federal ESPC Receivable Federal ESPC receivable represents the amount to be paid by various federal government agencies for work performed and earned by the Company under specific ESPCs. The Company assigns certain of its rights to receive those payments to third-parties that provide construction and permanent financing for such contracts. Upon completion and acceptance of the project by the government, typically within 24 to 36 months of construction commencement, the assigned ESPC receivable from the government and corresponding ESPC liability are eliminated from the Company’s condensed consolidated financial statements. Project Development Costs The Company capitalizes as project development costs only those costs incurred in connection with the development of energy projects, primarily direct labor, interest costs, outside contractor services, consulting fees, legal fees and travel, if incurred after a point in time where the realization of related revenue becomes probable. Project development costs incurred prior to the probable realization of revenue are expensed as incurred. The Company classifies as a current asset those project development efforts that are expected to proceed to construction activity in the twelve months that follow. The Company periodically reviews these balances and writes off any amounts where the realization of the related revenue is no longer probable. Project development costs of $217 and $639 were included in other long-term assets at March 31, 2019 and December 31, 2018, respectively. Property and Equipment Property and equipment consists primarily of office and computer equipment, and is recorded at cost. Major additions and improvements are capitalized as additions to the property and equipment accounts, while replacements, maintenance and repairs that do not improve or extend the life of the respective assets are expensed as incurred. Depreciation and amortization of property and equipment are computed on a straight-line basis over the following estimated useful lives: Asset Classification Estimated Useful Life Furniture and office equipment Five years Computer equipment and software costs Three to five years Leasehold improvements Lesser of term of lease or five years Automobiles Five years Land Unlimited Gains or losses on disposal of property and equipment are reflected in selling, general and administrative expenses in the condensed consolidated statements of income. Energy Assets Energy assets consist of costs of materials, direct labor, interest costs, outside contract services, deposits and project development costs incurred in connection with the construction of small-scale renewable energy plants that the Company owns. These amounts are capitalized and amortized to cost of revenues in the Company’s condensed consolidated statements of income on a straight line basis over the lives of the related assets or the terms of the related contracts. The Company capitalizes interest costs relating to construction financing during the period of construction. Capitalized interest is included in energy assets, net in the Company’s condensed consolidated balance sheets. Capitalized interest is amortized to cost of revenues in the Company’s condensed consolidated statements of income on a straight line basis over the useful life of the associated energy asset. There was $788 and $994 of interest capitalized for the three months ended March 31, 2019 and 2018 , respectively. Routine maintenance costs are expensed in the current year’s condensed consolidated statements of income to the extent that they do not extend the life of the asset. Major maintenance, upgrades and overhauls are required for certain components of the Company’s assets. In these instances, the costs associated with these upgrades are capitalized and are depreciated over the shorter of the remaining life of the asset or the period until the next required major maintenance or overhaul. Included in energy assets are financing lease assets and accumulated depreciation of financing lease assets. For additional information see the Sale-Leaseback section below. Financing leases were referred to as capital leases under previous guidance. The Company evaluates its long-lived assets for impairment as events or changes in circumstances indicate the carrying value of these assets may not be fully recoverable. Examples of such triggering events applicable to the Company’s assets include a significant decrease in the market price of a long-lived asset or asset group or a current-period operating or cash flow loss combined with a history of operating or cash flow losses or a projection or forecast that demonstrates continuing losses associated with the use of a long-lived asset or asset group. The Company evaluates recoverability of long-lived assets to be held and used by estimating the undiscounted future cash flows before interest associated with the expected uses and eventual disposition of those assets. When these comparisons indicate that the carrying value of those assets is greater than the undiscounted cash flows, the Company recognizes an impairment loss for the amount that the carrying value exceeds the fair value. The Company has applied for and received cash grant awards from the U.S. Treasury Department (the “Treasury”) under Section 1603 of the American Recovery and Reinvestment Act of 2009 (the “Act”). The Act authorized the Treasury to make payments to eligible persons who place in service qualifying renewable energy projects. The grants are paid in lieu of investment tax credits. All of the cash proceeds from the grants were used and recorded as a reduction in the cost basis of the applicable energy assets. If the Company disposes of the property, or the property ceases to qualify as specified energy property, within five years from the date the property is placed in service, then a prorated portion of the Section 1603 payment must be repaid. The Company last received a Section 1603 grant during the year ended December 31, 2014. No further Section 1603 grant payments are expected to be received as the program has expired. For tax purposes, the Section 1603 payments are not included in federal and certain state taxable income and the basis of the property is reduced by 50% of the payment received. Deferred grant income of $6,499 and $6,637 recorded in the accompanying condensed consolidated balance sheets as of March 31, 2019 and December 31, 2018 , respectively, represents the benefit of the basis difference to be amortized to income tax expense over the life of the related property. Leases All significant lease arrangements are recognized at lease commencement. Operating lease right-of-use (“ROU”) assets and lease liabilities are recognized at commencement. An ROU asset and corresponding lease liability are not recorded for leases with an initial term of 12 months or less (short term leases) as the Company recognizes lease expense for these leases as incurred over the lease term. ROU assets represent the Company’s right to use an underlying asset during the reasonably certain lease term and lease liabilities represent the Company’s obligation to make lease payments arising from the lease. The Company’s lease terms may include options to extend or terminate the lease when it is reasonably certain that the Company will exercise that option. Operating lease ROU assets and liabilities are recognized at commencement date based on the present value of lease payments over the lease term. The Company uses its incremental borrowing rate, which is updated annually or when a significant event occurs that would indicate a significant change in rates, based on the information available at commencement date, in determining the present value of lease payments. The operating lease ROU asset also includes any lease payments related to initial direct cost and prepayments and excludes lease incentives. Lease expense is recognized on a straight-line basis over the lease term. The Company has lease agreements with lease and non-lease components, which are generally accounted for as a single component. See Note 8 for additional discussion on the Company’s leases. Deferred Financing Fees Deferred financing fees relate to the external costs incurred to obtain financing for the Company. Deferred financing fees are amortized over the respective term of the financing using the effective interest method, with the exception of the Company’s revolving credit facility and construction loans, as discussed in Note 15, for which deferred financing fees are amortized on a straight-line basis over the term of the agreement. Deferred financing fees are presented on the condensed consolidated balance sheets as a reduction to long-term debt and financing lease liabilities. Goodwill and Intangible Assets The Company has classified as goodwill the amounts paid in excess of fair value of the net assets (including tax attributes) of companies acquired in purchase transactions. The Company has recorded intangible assets related to customer contracts, customer relationships, non-compete agreements, trade names and technology, each with defined useful lives. The Company assesses the impairment of goodwill and intangible assets that have indefinite lives on an annual basis (December 31 st ) and whenever events or changes in circumstances indicate that the carrying value of the asset may not be recoverable. The process of evaluating the potential impairment of goodwill requires significant judgment. The Company regularly monitors current business conditions and other factors including, but not limited to, adverse industry or economic trends, restructuring actions and projections of future results. T he Company estimates the reporting units fair value and compares it with the carrying value of the reporting unit, including goodwill. If the fair value is greater than the carrying value of its reporting unit, no impairment is recorded. Fair value is determined using both an income approach and a market approach. The estimates and assumptions used in the Company’s calculations include revenue growth rates, expense growth rates, expected capital expenditures to determine projected cash flows, expected tax rates and an estimated discount rate to determine present value of expected cash flows. These estimates are based on historical experiences, the Company’s projections of future operating activity and its weighted-average cost of capital. If the fair value is less than the carrying value, an impairment loss is recognized for the amount that the carrying amount of a reporting unit, including goodwill, exceeds its fair value, limited to the total amount of goodwill allocated to that reporting unit. The impairment charge would be recorded to earnings in the condensed consolidated statements of income. Judgment is required in determining whether an event has occurred that may impair the value of goodwill or identifiable intangible assets. Acquired intangible assets other than goodwill that are subject to amortization include customer contracts and customer relationships, as well as software/technology, trade names and non-compete agreements. The intangible assets are amortized over periods ranging from one to fifteen years from their respective acquisition dates. The Company evaluates its intangible assets for impairment consistent with, and part of, their long-lived assets evaluation, as discussed in Energy Assets above. See Note 5 for additional disclosures. Other Assets Other assets consist primarily of notes and contracts receivable due to the Company from various customers and non-current restricted cash. Other assets also include, the fair value of derivatives determined to be assets, the non-current portion of project development costs, accounts receivable retainages, sale-leaseback deferred loss and deferred contract costs. Asset Retirement Obligations The Company recognizes a liability for the fair value of required AROs when such obligations are incurred. The Company records, as liabilities, the fair value of the AROs on a discounted basis when incurred and reasonably estimated which is typically at the time the assets are installed or operating. Over time the liabilities increase due to the change in present value, and initial capitalized costs are depreciated over the useful life of the related assets. Upon satisfaction of the ARO conditions any difference between the recorded ARO liability and the actual retirement cost incurred is recognized as an operating gain or loss in the condensed consolidated statements of income. See Note 6 for additional disclosures on the Company’s AROs. Federal ESPC Liabilities Federal ESPC liabilities, for both projects and energy assets, represent the advances received from third-parties under agreements to finance certain ESPC projects with various federal government agencies. For projects related to the construction or installation of certain energy savings equipment or facilities developed for the government customer, upon completion and acceptance of the project by the government, typically within 24 to 36 months of construction commencement, the ESPC receivable from the government and corresponding ESPC liability is eliminated from the Company’s condensed consolidated balance sheet. Until recourse to the Company ceases for the ESPC receivables transferred to the investor, upon final acceptance of the work by the government customer, the Company remains the primary obligor for financing received. For small-scale energy assets developed for the government customer that the Company owns and operates, upon final acceptance of the work by the government customer, the Company remains the primary obligor for financing received and the liability is eliminated from the Company’s condensed consolidated balance sheet as contract payments assigned by the customer are transferred to the investor. Sale-Leaseback During the first quarter of 2015, the Company entered into an agreement with an investor which gives the Company the option to sell and contemporaneously lease back solar photovoltaic (“solar PV”) projects. In September 2016, the Company amended this agreement to increase the investor’s commitment up to a maximum combined funding amount of $100,000 through June 30, 2017 on certain projects. In May 2017, the Company amended this agreement to extend the end date of the agreement to June 30, 2018. During the third quarter of 2018, the Company entered into an agreement with an investor which gives the Company the option to sell and contemporaneously lease back solar PV projects through August 2019 up to a maximum funding amount of $100,000 . During the three months ended March 31, 2019 and 2018 the Company entered into no sale-leaseback agreements. As part of these agreements, the Company is a party to a master lease agreement that provides for the sale of solar PV projects to a third-party investor and the simultaneous leaseback of the projects, which the Company then operates and maintains, recognizing revenue through the sale of the electricity and solar renewable energy credits generated by these projects. In sale-leaseback arrangements, the Company first determines whether the solar PV project under the sale-leaseback arrangement is “integral equipment.” A solar PV project is determined to be integral equipment when the cost to remove the project from its existing location, including the shipping and reinstallation costs of the solar PV project at the new site, including any diminution in fair value, exceeds 10% of the fair value of the solar PV project at the time of its original installation. When the leaseback arrangement expires, the Company has the option to purchase the solar PV project for the then fair market value or, in certain circumstances, renew the lease for an extended term. All solar PV projects sold to date under the sale-leaseback program have been determined by the Company not to be integral equipment as the cost to remove the project from its existing location would not exceed 10% of its original fair value. For solar PV projects that the Company has determined not to be integral equipment, the Company then determines if the leaseback should be classified as a financing lease or an operating lease. All solar PV projects sold to date under the sale-leaseback program have been determined by the Company to be financing leases. For leasebacks classified as financing leases, the Company initially records a financing lease asset and financing lease obligation in its condensed consolidated balance sheet equal to the lower of the present value of the Company’s future minimum leaseback payments or the fair value of the solar PV project. For financing leasebacks, the Company defers any gain or loss, representing the excess or shortfall of cash received from the investor compared to the net book value of the asset in the Company’s condensed consolidated balance sheet at the time of the sale. The Company records the long term portion of any deferred gain or loss in other liabilities and other assets, respectively, and the current portion of any deferred gain and loss in accrued expenses and other current liabilities and prepaid expenses and other current assets, respectively, in its condensed consolidated balance sheet and amortizes the deferred amounts over the lease term in cost of revenues in its condensed consolidated statements of income. Net amortization expense in cost of revenues related to deferred gains and losses was $57 and $59 of net gains for the three months ended March 31, 2019 and 2018 , respectively. A summary of amounts related to sale leasebacks in the Company’s condensed consolidated balance sheets is as follows: March 31, December 31, 2019 2018 Financing lease assets, net $ 37,731 $ 38,263 Deferred loss, short-term, net 115 115 Deferred loss, long-term, net 1,888 1,917 Total deferred loss $ 2,003 $ 2,032 Financing lease liabilities, short-term 4,958 4,956 Financing lease liabilities, long-term 28,379 28,407 Total financing lease liabilities $ 33,337 $ 33,363 Deferred gain, short-term, net 345 345 Deferred gain, long-term, net 5,722 5,808 Total deferred gain $ 6,067 $ 6,153 As of January 1, 2019, the Company adopted Accounting Standard Update (“ASU”) 2016-02, Leases (Topic 842) and, along with the standard, elected to take the practical expedient that the Company will not reassess lease classifications at adoption. Accordingly, these sales-leasebacks will remain under the previous guidance. See Note 8 for additional information on these sale-leasebacks. Other Liabilities Other liabilities consist primarily of deferred revenue related to multi-year operation and maintenance contracts which expire at various dates through 2033 . Other liabilities also include the fair value of derivatives, the long term portion of sale-leaseback deferred gains, ESPC energy asset liabilities, ARO liability, and certain contingent consideration. See Note 10 for additional disclosures. Revenue Recognition The Company derives revenues from energy efficiency and renewable energy products and services. Energy efficiency products and services include the design, engineering, and installation of equipment and other measures to improve the efficiency, and control the operation, of a facility’s energy infrastructure. Renewable energy products and services include the construction of small-scale plants that produce electricity, gas, heat or cooling from renewable sources of energy, the sale of such electricity, gas, heat or cooling from plants that the Company owns, and the sale and installation of solar energy products and systems. Below is a description of the Company’s primary lines of business. Projects - The Company’s principal service relates to energy efficiency projects, which entails the design, engineering and installation of, and assisting with the arranging of financing for an ever-increasing array of innovative technologies and techniques to improve the energy efficiency, and control the operation, of a building’s energy- and water- consuming systems. In certain projects, the Company also designs and constructs for a customer a central plant or cogeneration system providing power, heat and/or cooling to a building, or a small-scale plant that produces electricity, gas, heat or cooling from renewable sources of energy. The Company recognizes revenue from the installation or construction of projects over time using the cost-based input method. The Company uses the total costs incurred on the the project relative to the total expected costs to satisfy the performance obligation. When the estimate on a contract indicates a loss, or claims against costs incurred reduce the likelihood of recoverability of such costs, the Company records the entire estimated loss in the period the loss becomes known. Operations & Maintenance (“O&M”) - After an energy efficiency or renewable energy project is completed, the Company often provides ongoing O&M services under a multi-year contract. These services include operating, maintaining and repairing facility energy systems such as boilers, chillers and building controls, as well as central power and other small-scale plants. For larger projects, the Company frequently maintains staff on-site to perform these services. Maintenance revenue is recognized using the input method to recognize revenue. In most cases, O&M fees are fixed annual fees. Because the Company is on-site to perform O&M services, the services are typically a distinct series of promises, and those services have the same pattern of transfer to the customer (i.e., evenly over time), the Company records the revenue on a straight-line basis. Some O&M service contract fees are billed on time expended. In those cases, revenue is recorded based on the time expended in that month. Energy Assets - The Company’s service offerings also includes the sale of electricity, processed renewable gas fuel, heat or cooling from the portfolio of assets that the Company owns and operates. The Company has constructed and is currently designing and constructing a wide range of renewable energy plants using landfill gas (“LFG”), wastewater treatment biogas, solar, biomass, other bio-derived fuels, wind and hydro sources of energy. Most of the Company’s renewable energy projects to date have involved the generation of electricity from solar PV and LFG or the sale of processed LFG. The Company purchases the LFG that otherwise would be combusted or vented, processes it, and either sells it or uses it in its energy plants. The Company has also designed and built, as well as owns, operates and maintains, plants that take biogas generated in the anaerobic digesters of wastewater treatment plants and turns it into renewable natural gas that is either used to generate energy on-site or that can be sold through the nation’s natural gas pipeline grid. Where the Company owns and operates energy producing assets, the Company typically enters into a long-term power purchase agreement (“PPA”) for the sale of the energy. Many of the Company’s energy assets also produce environmental attributes, including renewable energy credits (“RECs”) and Renewable Identification Numbers (“RINs”). In most cases, the Company sells these attributes under separate agreements with third parties other than the PPA customer. The Company recognizes revenues from the sale and delivery of the energy output from renewable energy plants, over time as produced and delivered to the customer, in accordance with specific PPA contract terms. Environmental attributes revenue is recognized at a point in time, when the environmental attributes are transferred to the customer in accordance with the transfer protocols of the environmental attributes market that the Company operates in. In those cases where environmental attributes are sold to the same customer as the energy output, the Company records revenue monthly for both the energy output and the environmental attribute output, as generated and delivered to the customer. = Other - The Company’s service and product offerings also include integrated-PV and consulting and enterprise energy management services. The Company recognizes revenues from delivery of engineering, consulting services and enterprise energy management services over time. For the sale of solar materials, revenue is recognized at a point in time when the Company has transferred physical control of the asset to the customer upon shipment. To the extent a contract is deemed to have multiple performance obligations, the Company allocates the transaction price of the contract to each performance obligation using its best estimate of the standalone selling price of each distinct good or service in the contract. Billings in excess of cost and estimated earnings represents advanced billings on certain construction contracts. Costs and estimated earnings in excess of billings represent certain amounts under customer contracts that were earned and billable but not invoiced. See Note 3 for additional information on the Company’s revenues. Cost of Revenues Cost of revenues include the cost of labor, materials, equipment, subcontracting and outside engineering that are required for the development and installation of projects, as well as preconstruction costs, sales incentives, associated travel, inventory obsolescence charges, amortization of intangible assets related to customer contracts and, if applicable, costs of procuring financing. A majority of the Company’s contracts have fixed price terms; however, in some cases the Company negotiates protections, such as a cost-plus structure, to mitigate the risk of rising prices for materials, services and equipment. Cost of revenues also include the costs of maintaining and opera |