Add js commmand
Rejigger javascript api