convert unnamed enum into enum class A

and cleanup enum Repeat, a leftover from 6c6c6ad