Migrated the scripts to rake commands