Refactored per code review notes