refactorings fetch.rb into multiple files