Replacing macro with enum