Fixed code style of JavaScripts

Small changes and optimization
All information added to CHANGELOG.md file