A small refactor