Very small refactor to make the code nicer