Reformatted most code