Fix rake tasks

I have rearranged the rake tasks to conform to ruby convention.