Another refactor to improve readability