overall improvements to javascript code quality