Apply cosmetic changes suggested by JSLint and pylint