Reformatted code for easier reading.