Modify according to fjy's review, add reformatting according to eaclipse_formatting.xml