misc. minor updates

From other point of view  undef in that point of code tends me to find another define with the same name or may even a function.
I use macroses rarely, and undef once or two to undef some windows macros like SetPosition which expands to SetPositionA. ) I tried to build some api on macroses if it required instead of use once.
But, ok. Anyway code looks better.

Thank you for patch.