In April 2015, we announced our decision to exit markets in which we participate outside of North America. Our strategy is to sell or relocate the assets of the businesses operating in these markets. To this end, during the second half of 2015, we ceased operations in Colombia, Ecuador and the Middle East. During the fourth quarter of 2016, we completed the sale of our business in Mexico, and we completed the sale of our Canadian subsidiary and Russian subsidiary in the second and third quarters of 2017, respectively. Additionally, in 2017 we sold our frac stack and testing business.
On December 15, 2016, the Company emerged from a pre-planned voluntary chapter 11 reorganization resulting in approximately $697 million of the Company’s long-term debt being eliminated along with more than $45.6 million of annual interest expense going forward.
On December 15, 2016, we entered into our new $80 million ABL Facility (which was increased to $100 million on February 3, 2017) due June 15, 2021, and our new $250 million Term Loan Facility due December 15, 2021. As of December 31, 2017, we had no borrowings outstanding under the ABL Facility and $35.6 million of letters of credit outstanding with borrowing capacity of $24.7 million available subject to covenant constraints under our ABL Facility.
Beginning in the first quarter of 2015, we began a series of structural cost cutting changes at both corporate and field levels, which include fixed costs, supply-chain efficiencies and headcount and wage reductions which has continued into 2017.
However, we still have substantial indebtedness and other obligations, and we may incur additional expenses that we are unable to predict at this time.
Our ability to fund our operations, pay the principal and interest on our long-term debt and satisfy our other obligations will depend upon our available liquidity and the amount of cash flows we are able to generate from our operations. During 2017, our net cash used in operating activities was $51.4 million, and, if industry conditions do not improve, we may have negative cash flows from operations in 2018.
As of December 31, 2017, our working capital was $83.0 million compared to $117.8 million as of December 31, 2016. Our working capital decreased during 2017 primarily as a result of a decrease in cash and cash equivalents and restricted cash partially offset by the decrease in other accrued expenses.
As of December 31, 2017, we had $73.1 million of cash, of which approximately $0.7 million was held in the bank accounts of our foreign subsidiaries. As of December 31, 2017, $0.2 million of the cash held by our foreign subsidiaries was held in U.S. bank accounts and denominated in U.S. dollars. We believe that the cash held by our wholly owned foreign subsidiaries could be repatriated for general corporate use without material withholdings.
Cash used in operating activities was $51.4 million, $0.4 million, and $138.4 million for the year ended December 31, 2017 and periods from December 16, 2016 through December 31, 2016 and from January 1, 2016 through December 15, 2016, respectively. Cash used by operating activities for these periods was primarily related to net loss adjusted for noncash items and payments of accounts payable and other accrued liabilities partially offset by cash inflows related to the collection of accounts receivable.
Cash provided by investing activities was $16.9 million and $6.5 million for the year ended December 31, 2017 and the period from January 1, 2016 through December 15, 2016, respectively, cash used in investing activities was $0.3 million for the period from December 16, 2016 through December 31, 2016. Investing cash inflows primarily relate to sales of assets during these periods. Investing cash outflows primarily relate to capital expenditures. Capital expenditures primarily relate to replacement assets for our existing fleet and equipment.
Cash provided by financing activities was $17.2 million and $18.8 million for the year ended December 31, 2017 and the period from January 1, 2016 through December 15, 2016, respectively, cash used in financing activities was less than $0.1 million for the period from January 1, 2016 through December 15, 2016. Cash provided by financing activities for the year ended December 31, 2017 primarily relate to the reduction in restricted cash. Cash provided by financing activities for the period from January 1, 2016 through December 15, 2016 was primarily related to proceeds from stock offering, which was in connection with emerging from bankruptcy, partially offset by repayment of long-term debt and increase in restricted cash.