remove RuntimeException from JavaScript code; update headers