Factor out nodes variable and rspec-ify names.