moved javascript to the bottom of the app page