Refactoring core JS code and removed useless js files from vendor directory