Removed gotos from main.c