Shifted execution code into main.c