Refactor in Rakefile.