Use enums instead of defines

Avoids name conflicts.