Code reformatted with new style