Rakefile refactor