json config file
merge
Fix memleaks, proper shutdown