Another small refactoring to keep the locals code concise