Refactor to improve intent of code