Refactor enums used in front end

Remove repeated dtos.
You can move it to a util class.