get rid of debug branches in JavaScript code