59523: JS modules refactoring