Rake task improvements