versioning of js files and fixed #646, #523, #639