Small refactoring to make things pretty