Added config, fixed some minor config related issue