split of qmp stuff into its own file
drop unused macros
read the config before forking