Move trimming on address input to the api-js module