Minor code review and cleanup