Reformatted according to my personal preference.