New js file

New js file and made last code lines prettier