refactors rake tasks for better organization