Refactoring and reorganze feature test js flags