Update main.c

Implemented MAX_DATA_SIZE, not tested yet. (changes commented out)