Cleanup JS. #1188