Minor nit fixes for api.js