Committed main function