Even as a chapter of Yahoo may be coming to a close, CEO Marissa Mayer said she remains committed to the company. Mayer told investors she remains "optimistic" about the future of Yahoo, as it slashes costs and may sell its core business.

"We took a hard honest look at where we were and where we wanted to be, and took steps to get there," Mayer said in a conference call with investors Monday. "This quarter has not been without its unique set of challenges." Mayer thanked the "resilient" team at Yahoo for laying the groundwork for the company's next chapter — which could make this quarter its last as a publicly-traded independent company — though she said headcount has fallen 45 percent since her tenure began in 2012. Tweet: "I am proud of what this company has achieved over these past 4 years, I remain committed to our team & $YHOO - @marissamayer" Yahoo's staff count is down 2,100 year over year as of the second quarter, according to its earnings presentation.

Earnings

The company reported quarterly earnings that slightly missed analysts' expectations, and revenue that beat projections — in part due to what CEO Marissa Mayer called "disciplined expense management."

Yahoo posted second-quarter earnings per share of 9 cents, compared to 16 cents a share a year earlier. Revenue came in at $1.31 billion, up from $1.24 billion. Analysts had expected Yahoo to report earnings of about 10 cents per share on $1.08 billion in revenue, according to a consensus estimate from Thomson Reuters. "With the lowest cost structure and head count in a decade, we continue to make solid progress against our 2016 plan," Mayer said in an earnings release.

Sale of core

The earnings report comes as Yahoo may be near the end of its time as an independent company. Yahoo is said to be in the final stages of reviewing bids for the sale of its core business.

"I personally believe that the right transaction could unlock tremendous value," Mayer said during last quarter's earnings report.

During the second quarter, Yahoo added four directors to its board in a settlement with activist investor Starboard Value. The company's shares are down more than 1 percent over the past year, but up 13 percent year to date. That's in part because of the possibility of a sale of the core business, Zacks' deputy manager Sejuti Banerjea told CNBC.

The sale of the core business, which reportedly could see suitors like Verizon, comes as shareholders eye the value of the company's Alibaba stake as Yahoo's search and advertising services struggle. While the number of ads sold increased 9 percent compared to the year-earlier period, the company's price-per-ad on display decreased 15 percent, year over year, it said. The number of paid clicks sank 24 percent in the second quarter, compared to a year ago, while the price-per-click popped 8 percent. Yahoo has around 3 percent of global digital advertising, according to Brian Wieser of Pivotal Research Group, who recently downgraded the stock. At its peak, Yahoo had around 20 percent share, Wieser wrote.

Video

Yahoo has doubled down on video, especially live-streams, with events like Brexit bringing traffic to the site. But third-party video has been weighed down by uncertainty surrounding the company's strategic alternatives, Mayer said, while ad dollars to digital video are still staying in TV and lagging overall trends. Mayer said she's seeing tremendous engagement in live video — Yahoo's seen an 88 percent year-over-year boost in total video stream — and she expects to see price appreciations in banner advertising inside the next year. "We think it's about bringing those television dollars in," Mayer said. "Because there's been so much supply coming in .... there's been price pressure, thought it is still a premium unit.

Mavens and mobile

Mayer has tried to focus investors on the expansion of "mavens" — a term that stands for mobile, video, native and social operations. Mavens revenue came in at $504 million for the quarter, up from $401 million a year earlier. Mobile revenue hit $378 million, up from $252 million. Excluding a change in revenue presentation, Mavens would have been $385 million and mobile revenue would have been $259 million.

Mozilla and Tumblr