#defines in the middle of code

you really should use the const keyword for constants

I do. (promise!) The defines are for things like:

#define num(arr) (sizeof(arr) / sizeof(arr[0]))

and I have them in the middle of the code because they are to be used together with a class defined there.