Implemented JS code generation for new functionality.