Update main.c

First draft, commits and/or ideas are welcome.