The company is still losing hundreds of millions of dollars, but at least its losses are narrowing.