changed the way index works, has setup function which allows us to preload
langs, also moved set lang based on domain middlewear there