Adding some main.c mods
Fix conflicts