Refactored Rakefile