added -Wall + cleanup, stopped at init_main_config