Formatting and removal of useless code in example2