TOUCHE: Reduce the scope of a variable
TOUCHE: Move some enums and struct definition to header file, get rid of some void* parameters