CSX CEO Jim Foote.

CSX Chief Executive Officer Jim Foote told investors he was going to run his railroad at a lower cost, and now shareholders are rewarding him for doing just that.

CSX Corp. (CSX - Get Report) shares jumped in after-hours trading Tuesday, April 17, after reporting a top- and bottom-line beat for the first quarter, driven by lower costs and restructuring expenses.

The Jacksonville, Fla.-based rail transportation company posted earnings of 78 cents on revenue of $2.88 billion, topping analysts' expectations of 65 cents per share on revenue of $2.79 billion.

CSX's operating ratio for the quarter improved 950 basis points to 63.7% from 73.2% during the same period last year. The company is targeting full-year operating ratio to 60% by 2020.

Shares of CSX ­­­­­­­­­­­­rose 4.5% to $59.10 at 4:15 p.m. New York time. The stock closed at $56.57, up about 0.3%, on Tuesday.

"CSX employees did a great job of running the railroad and executing the scheduled railroading model during challenging weather conditions," Foote said in a statement. "We're more confident in our ability to deliver safe, reliable, best-in-class service for our customers and enhanced value for our shareholders."

The company noted that expenses of $1.8 billion decreased by $268 million year over year, "primarily driven by efficiency and volume saving of $157 million and a restructuring charge of $110 million in 2017, partially offset by inflation."

The financial results Tuesday marked the second quarterly earnings that Foote presided over following the death of railroading legend Hunter Harrison who passed away at the age of 73. Harrison had been installed as CEO of CSX in April 2017 as part of activist investor Paul Hilal's efforts to shake up management at the railroad company.

Despite the rather sudden change in leadership, Foote is committed to carrying on Harrison's plans to transform CSX from a traditional railroad model to a scheduled railroad model, which improves efficiency and quality of service.

"We are committed to following through with what he started," Foote said March 1 during CSX's investor day presentation. "The plan is to make CSX the best-run railroad in North America."

Part of that plan includes cuts to the workforce as well as the reduction of rail cars and locomotives in service. CSX also intends to boost profitability through the monetization of some of its real estate assets and railroad lines.

"CSX identified $800 million of real estate gains and line sales by 2020 that would be additive to its targeted $8.5 billion of cumulative free cash flow over the 2018 to 2020 period," Credit Suisse analysts Allison Landry and Anuj Shah wrote in a March 2 research note. The firm rates CSX at Outperform.

With all of these actions, CSX also expects revenue growth at a compound annual rate of 4% in 2019 and 2020.

"We believe that CSX is well-positioned to deliver EPS growth above that of its peers during 2018 to 2020," TD Securities' equity research analyst Cherilyn Radbourne said following CSX's investor day.

There are 17 Buys, eight Holds and two Sells on CSX stock, according to Bloomberg data.