Small refactorings

Had this one lying around from exploring the codebase a bit yesterday.