Cleaned code a little.

Removed typedefs from header files where they are only used internal.
Removed none used macros and changed all macro names to upper case.