Refactored to make linting happy, vol. 2