Update main.c

Builds fine, not debugged or tested yet.