Small refactor exercise