Cleanup controllers code
Closes #517 (closed)
What does this MR do?
Refactors in the controllers code (remove magic numbers, rename variables to meaningful names, restructure methods, shrink methods)
How confident are you it won't break things if deployed?
No functional changes, tests are passing. So everything's fine.
Edited by Leo