Pass config to MainHandler rather than the app