Reformmated code to be uniform.