Move some variable to config, fix bug in init()