moved js to corresponding views/*.js