More work on API js