Update main.ino

Used an enum instead of #defines, extra function for mode changing, some other small things
.