Moved main definition to top of main.c.