Prefer enum types over swagger annotations

- Also general cleanup
Reformatted code to normalize spacing