JavaScript code re-formatted in accordance with JSLint from PyCharm.