Replace the generic integer with an enumerated list. This allows light type check and helps debugging (seeing action = 2 in the struct is not helpful).