Minor refactoring

This should have been multiple commits to make it clear what was changed
but oh well, this is in the early stages of the project.