Reformatted it to reflect my style of writing PHP.