Reformatted to current indentation standards, no functional change.