Created separate js file, the right way