Refactor based on feedback