Tighten assertions and minor reformat.