JSB refactoring