tool_main: Changed stack based config struct to be heap based