remove js from views and place in frontend scripts folder