Refactored rakefile.rb