Merged JavaScript back-end into index page