Split the index.js file to separate the admin page js code