Started refactoring rc.rb