Remove superflous javascript code