Migrated the flag.js file