Separate the different implementations.
Add JS implementation.