The helper function makes it easier to convert enum values at runtime to their integer representation. Also changed the configuration processing code to use the new function.