Code reformatted slightly.