Federal regulators and U.S. railroads have agreed to voluntary changes that could make shipping crude oil by train safer. The agreement comes one week after an oil train derailed in western Pennsylvania, spilling thousands of gallons of crude.

Railroads will slow down oil trains as they move through major cities, inspect tracks more frequently, and pay to boost emergency planning along their routes. Federal regulators said these voluntary changes are paving the way for more regulation since a dramatic increase in crude oil rail traffic has resulted in more major accidents across the country.

"It does seem pretty obvious that one should look at the problem in all its aspects," said Phil Rinaldi, CEO of Philadelphia Energy Solutions. 

The refinery in South Philadelphia takes in at least two loads of crude oil every day on trains stretching more than 100 cars long. Right now, it's the best way for Rinaldi to keep Philadelphia in the refining business, but he admits there's room for improvement.

"We think that we're taking prudent risk and maybe this is a little bit of a learning as we go along, but railroads have been pulling cargo for just too many years to believe that they can't do that safely," Rinaldi said.

In the last two months, two oil trains derailed in Pennsylvania, including one that left tank cars leaning on a bridge over an interstate and the Schuylkill River in Philadelphia.

The deal does not call for using stronger, reinforced tank cars for transporting oil, but that could be part of a future agreement. The industry's voluntary changes are expected to take effect by July.