More JS component refactoring