Use type safe enums instead of ints