Refacterd prod and dev rake tasks