Refactored to make linting happy, vol. 3
Refactored to make linting happy, vol. 4
Refactored to make linting happy, vol. 5