Improve JavaScript