Heavily reformatted/simplified things to make it easier to read.