more flexible config, less waiting, autodiscover appname. Thanks @suzanshakya