Updated with JavaScript code conventions