Refactor and add notes to JavaScript.md