Update main.c

Converted all those for loops into macros and commented the python code