Reformatted rewrite to match coding standards.