Move initializer code to index page