Some code review for main