Move next button javascript to app's js file